home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / etkdoc.zip / ETKE.INF (.txt) next >
OS/2 Help File  |  1993-01-13  |  83KB  |  3,160 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Disclaimer - read first! ΓòÉΓòÉΓòÉ
  3.  
  4. The sample code for using the current version (5.51) of the E Toolkit and its 
  5. Enhanced Multi-Line Edit control (E-MLE) is being made available for the 
  6. benefit of those who need to use it now.  It is being released "as-is", with no 
  7. promise of support, enhancement, or bug fixes.  In addition, you should be 
  8. aware that we are currently working on a new, cleaner, API for the next major 
  9. update to EPM, which is not necessarily compatible with the one used in this 
  10. package. 
  11.  
  12. In mentioning the "next major update", we are not guaranteeing that this will 
  13. ever be released outside of IBM.  (That is not a decision that we can make.) 
  14. We are currently developing EPM 5.60, which includes long line support, pop-up 
  15. menus, and much more, and EPM 6.00, which is essentially a 32-bit version of 
  16. EPM 5.60. 
  17.  
  18. If you have a need to develop on top of the newer E-MLE, then please send a 
  19. note to Gennaro Cuomo (gcuomo at watson.IBM.com) describing why you need it. 
  20. This will help us demonstrate demand for the new code, and *might* get you on 
  21. our beta-test list. 
  22.  
  23.  
  24. ΓòÉΓòÉΓòÉ 2. Introduction. ΓòÉΓòÉΓòÉ
  25.  
  26. The E-Toolkit assists a software developer in building applications that edit 
  27. multiple lines of text.  The E-Toolkit gives developers access to OS/2 
  28. functions and PM messages that enable the creation and manipulation of an 
  29. advanced multi-line edit control window.  This multi-line edit window contains 
  30. an advanced text editor engine based on the "E" text editor technology.  (The E 
  31. Family of text editors include, E3 for DOS, E3AIX for AIX, EOS2 for Full Screen 
  32. OS/2, EPM and EPM/G for OS/2 Presentation Manager.)  This multi-line edit 
  33. window is referred to as the E-MLE.  The E-MLE is a versatile control window 
  34. that supports many primitive operations which allow easy access to powerful 
  35. text editing capabilities. 
  36.  
  37. For example, The E-MLE supports the editing of large files (limited only by 
  38. system memory).  Each E-MLE can store multiple files, each of which can be 
  39. viewed one at a time.  (The feature is known as a "file RING") The E-MLE 
  40. supports text with associated attribute information.  Using the attribute 
  41. feature your application can display text in Multiple Fonts, Multiple colors, 
  42. and even associate commands with regions of text. (Associating commands with 
  43. regions of text can be a way of implementing HyperText.)  An advanced feature 
  44. is available which allows other window classes to be overlayed with in a E-MLE. 
  45. Using this "Overlay Window" feature, a E-MLE can incorporate images along with 
  46. text. 
  47.  
  48. The E based editor engine runs in its own separate work thread. Therefore, when 
  49. primitive commands are executed (i.e. Load a file) the main process is not 
  50. blocked.  This built-in feature leads to programs that efficiently use the 
  51. computers CPU. 
  52.  
  53. The behavior of an E-MLE can be enhanced by adding new methods of behavior in 
  54. any of the following ways.  The E-MLE can be sub-classed using traditional PM 
  55. functions written in C. (i.e WinSubclassWindow(...)).  New methods can also be 
  56. added to an E-MLE by simply extending event definitions by writing E or REXX 
  57. macros. 
  58.  
  59. This document describes the Application Program Interface (API) of the 
  60. E-Toolkit.  Examples are provided that demonstrate some of the more popular way 
  61. in which an E-MLE can be used. 
  62.  
  63. As mentioned above, The E-MLE can also be extended by writing Macros.  The E 
  64. Technical Reference manual describes how macros can be written. 
  65.  
  66.  
  67. ΓòÉΓòÉΓòÉ 3. Writting programs using the E Toolkit ΓòÉΓòÉΓòÉ
  68.  
  69. There are four basic steps to creating an E-MLE window.  The first step is to 
  70. Register the E-MLE window class.  After Registration, a data structure, 
  71. describing the desired characteristics of your E-MLE, must be created.  The 
  72. next step involves actually creating the E-MLE and an receiving a handle to the 
  73. E-MLE in return.  This handle can now be used to manipulate the E-MLE window. 
  74.  
  75.   1. Register the E-MLE window Class. 
  76.   2. Fill in Data Structure. 
  77.   3. Create the E-MLE. 
  78.   4. Manipulate E-MLE 
  79.  
  80.  
  81. ΓòÉΓòÉΓòÉ 4. Getting Started. ΓòÉΓòÉΓòÉ
  82.  
  83. In order to write application programs using the E-Toolkit you first need to 
  84. download the latest EPM/G package from OS2TOOLS.  You will also need copies of 
  85. the OS/2 1.3 Programmers ToolKit, and the IBM C/2 compiler.  (We currently 
  86. provide language bindings to the 'C' programming language. ('ETOOLKT.H') 
  87.  
  88. Unpack the FLSBIN files that make up the EPM/G package.  (Use LOADRAM to unpack 
  89. FLSBIN files.) 
  90.  
  91. There are four major pieces that are essential to the building of your own 
  92. custom editor application. 
  93.  
  94.   1. ETKExxx.DLL - Heart of the E-Toolkit 
  95.   2. ETKRxxx.DLL - Utility Resources 
  96.   3. E-Macros - Utility Resources 
  97.   4. Your Application/Sample Programs 
  98.  
  99.  
  100. ΓòÉΓòÉΓòÉ 4.1. ETKExxx.DLL - The "Heart" of the E-Toolkit ΓòÉΓòÉΓòÉ
  101.  
  102. The first file is ETKExxx.DLL.  This is the dynamic link library that contains 
  103. the powerful functions that will allow you to create your own custom E-MLE 
  104. windows.  Both messages and functions are available for a user to subclass the 
  105. behavior of an E-MLE.  Sample functions include: EtkInsertText, 
  106. EtkProcessEditKey, and EtkSetFileField, and EtkQueryText Sample message include 
  107. the EPM_EDIT_COMMAND message allows any of the editor commands to be issued 
  108. against the receiving edit window.  The API to this library is described in 
  109. detail in this document. 
  110.  
  111.  
  112. ΓòÉΓòÉΓòÉ 4.2. ETKRxxx.DLL - Utility Resources ΓòÉΓòÉΓòÉ
  113.  
  114. The second file of interest is ETKRxxx.DLL.  This file contains Utility 
  115. Resources.  We call this our ERES-Toolkit.  It contains widgets that enhance 
  116. productivity when working with E-MLE's.  Dialogs boxes such as the Search, 
  117. Bookmark, and Error Message dialog can be displayed using the 
  118. EResPopDialog(...)  function.  Other utility functions like 
  119. EResCountEditWindow(...)  and EResOpenEditWindow(...)  are examples of 
  120. functions provided so programmers need not write some of the most common 
  121. actions taken upon E-MLE windows.  The API to this library is described in 
  122. detail in this document. 
  123.  
  124.  
  125. ΓòÉΓòÉΓòÉ 4.3. E-Macros - Utility Resources ΓòÉΓòÉΓòÉ
  126.  
  127. The set of E macros files can be use to build your own custom macros which will 
  128. enhance your applications E-MLE.  For example, you can build new commands using 
  129. the E macros "defc" construct that can be executed in C using either the 
  130. EtkExecuteCommand function of the EPM_EDIT_COMMAND message. 
  131.  
  132.  
  133. ΓòÉΓòÉΓòÉ 4.4. Your Application/Sample Programs ΓòÉΓòÉΓòÉ
  134.  
  135. This is the program that you write.  For example EPM.EXE.  EPM.EXE is small 
  136. piece of code that creates E-MLE's and provides the proper glue needed to tie 
  137. in dialogs, help, macros, and etc.  (The *source code* to EPM.EXE ver 5.50 is 
  138. available via request to EOS2.  It will become a permanent piece of our toolkit 
  139. package.) 
  140.  
  141. Note:  It is important that the two dynalink libraries are placed in a 
  142. sub-directory that is specified in your LIBPATH environment variable. (Your 
  143. LIBPATH environment variable is found in your CONFIG.SYS file.) 
  144.  
  145. Before you attempt to write you own application, you should examine the sample 
  146. programs provided with this package. A sample program named ESIMPLE is provided 
  147. to demonstrate the "basics" of an E-MLE application.  The sample contains two 
  148. source files: 
  149.  
  150.  o ESIMPLE.C 
  151.  o ESIMPLE.E 
  152.  
  153.  ESIMPLE.C creates a parent window containing a single E-MLE window.  The 
  154.  parent monitors cursor movement within the E-MLE by processing the 
  155.  EPM_EDIT_CURSORMOVE message.  When this message is received, a status line is 
  156.  painted containing the line and column of the cursor. 
  157.  
  158.  ESIMPLE.E contains a definition of a handful of keys. 
  159.  
  160.  ESIMPLE.MAK is provided to compile and link all components of the ESIMPLE 
  161.  example.  (When you build your own custom application, be sure to use the same 
  162.  link and compile options as used in the example. 
  163.  
  164.  You are now ready to write your own editor application using the Editor 
  165.  Toolkit. 
  166.  
  167.  
  168. ΓòÉΓòÉΓòÉ 4.5. Special Notes!!! ΓòÉΓòÉΓòÉ
  169.  
  170.   1. PM Queue size. 
  171.  
  172.      Take note of the PM Queue Size specified in the ESIMPLE program. 
  173.  
  174.               hmq = WinCreateMsgQueue(hab, 0x100);    // Create Queue
  175.      We strongly recommend the above PM queue definition because the E-MLE 
  176.      requires a large queue for message passing. 
  177.   2. E-MLE window handles. (E-MLE Positioning) 
  178.  
  179.      The E-MLE window is a standard PM window.  At minimum, it contains a frame 
  180.      window as well as a client window.  (You can us the PMstyle flag to add 
  181.      any other standard window control as well.) To position the E-MLE window 
  182.      one must use the frame window handle. The EtkCreate function returns a 
  183.      handle to the E-MLE client window. The following is an example of 
  184.      positioning an E-MLE window. 
  185.  
  186.              VOID PositionMLE( HWND hwndMLE, SHORT x, SHORT y, SHORT cx, SHORT cy)
  187.              { HWND hMLEFrame=WinQueryWindow( hwndMLE, QW_PARENT, FALSE );
  188.                WinSetWindowPos(hMLEFrame, NULL, x ,y ,cx ,cy, SWP_MOVE | SWP_SIZE);
  189.              }
  190.  
  191.  
  192. ΓòÉΓòÉΓòÉ 5. E Toolkit functions at a glance. ΓòÉΓòÉΓòÉ
  193.  
  194.  The following functions are used to create and manage E-MultiLine Edit (E-MLE) 
  195. windows: 
  196.  
  197.  
  198. ΓòÉΓòÉΓòÉ 5.1. Register, Create, Delete functions (The basics) ΓòÉΓòÉΓòÉ
  199.  
  200. The following Dynalink functions are used to registration, initialization, and 
  201. destroy E-MLE windows. 
  202.  
  203.  EtkRegister 
  204.            Register the E-MLE window class. 
  205.  EtkCreate 
  206.            Create an E-MLE Window. 
  207.  EtkDestroy 
  208.            Destroy a Edit Window. 
  209.  EtkVersion 
  210.            Retrieve the ETKxxx.DLL version number. 
  211.  EtkGetProcAddrs 
  212.            Retrieve function address of the "basic" functions. 
  213.  
  214.  
  215. ΓòÉΓòÉΓòÉ 5.2. Special Access- E-MLE Manipulation ΓòÉΓòÉΓòÉ
  216.  
  217. The following Dynalink functions are used to manipulate various aspects of an 
  218. E-MLE. 
  219.  
  220.  
  221. ΓòÉΓòÉΓòÉ 5.2.1. Event Execution. ΓòÉΓòÉΓòÉ
  222.  
  223.  EtkExecuteCommand 
  224.            Execute an command 
  225.  EtkProcessEditKey 
  226.            Execute a "built-in" key action 
  227.  
  228.  
  229. ΓòÉΓòÉΓòÉ 5.2.2. Text Minipulation ΓòÉΓòÉΓòÉ
  230.  
  231.  EtkDeleteText 
  232.            Delete a line of text. 
  233.  EtkReplaceText 
  234.            Replace a line of text with a new line. 
  235.  EtkInsertText 
  236.            Insert a new line of text. 
  237.  EtkQueryText 
  238.            Retreive a line of text. 
  239.  EtkQueryTextBuffer 
  240.            Retreive a range of lines. 
  241.  EtkInsertTextBuffer 
  242.            Insert a stream of text. 
  243.  EtkFindAttribute 
  244.            Search for an attribute associated with a line. 
  245.  
  246.  
  247. ΓòÉΓòÉΓòÉ 5.2.3. Text Selection ΓòÉΓòÉΓòÉ
  248.  
  249.  EtkSetSelection 
  250.            Select text 
  251.  EtkQuerySelection 
  252.            Query selection region. 
  253.  EtkQuerySelectionType 
  254.            Query Selection Type. 
  255.  
  256.  
  257. ΓòÉΓòÉΓòÉ 5.2.4. File Information ΓòÉΓòÉΓòÉ
  258.  
  259.  EtkQueryFileID 
  260.            Query the active files id. 
  261.  EtkSetFileField 
  262.            Set file related information 
  263.  EtkQueryFileField 
  264.            Query file related information 
  265.   EtkQueryFileFieldString 
  266.            Query file related information 
  267.  
  268.  
  269. ΓòÉΓòÉΓòÉ 5.2.5. Fonts ΓòÉΓòÉΓòÉ
  270.  
  271.  EtkRegisterFont 
  272.            Register a new font 
  273.  EtkRegisterFont2 
  274.            Register a new fixed pitch font. 
  275.  
  276.  
  277. ΓòÉΓòÉΓòÉ 5.2.6. Special Access. ΓòÉΓòÉΓòÉ
  278.  
  279.  EtkAccessLowLevelData 
  280.            It's a secret. :-) 
  281.  
  282.  
  283. ΓòÉΓòÉΓòÉ 6. Register, Create, Delete functions (The basics) ΓòÉΓòÉΓòÉ
  284.  
  285.  
  286. ΓòÉΓòÉΓòÉ 6.1. EtkRegister ΓòÉΓòÉΓòÉ
  287.  
  288.  
  289.   EtkRegister - 
  290.   (Register an E-Multi-line Edit Window) 
  291.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  292.  
  293.      Register the E-Multi-Line Edit Window Class for this process. 
  294.  
  295.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  296.           Γöé EtkRegister (  hab, class_style  , Window_Class_Name )
  297.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  298.  
  299.  Parameters 
  300.  
  301.      hab  ( HAB ) - input 
  302.         Application anchor block 
  303.  
  304.      class_style  ( ULONG ) - input 
  305.         Default window style. This can be any of the standard PM class styles 
  306.         CS_*. 
  307.  
  308.  Returns 
  309.  
  310.      Window_Class_Name (PSZ ) - 
  311.         Pointer to window-class-name string in which the editor window was 
  312.         registered under. 
  313.  
  314.  Remarks 
  315.  
  316.      This call only needs to be called once per application.  This function 
  317.      issues a WinRegisterClass.  Your application can customize this 
  318.      registration process.  The first 16 bytes of window storage is reserved 
  319.      for the E-MLE window.  You can use EtkWndProc as the default window 
  320.      procedure for your custom class. 
  321.  
  322.  Example 
  323.  
  324.             WinRegisterClass(                          // Register Window Class
  325.                              (HAB)hab,                 // Anchor block handle
  326.                              (PSZ)classEwindow,        // Window Class name
  327.                              (PFNWP)EtkWndProc,        // Address of Window Procedure
  328.                              (ULONG)class_style,       // class style
  329.                              (USHORT)16                // ETK uses the first 16bytes of
  330.                             );                         // the reserved long.
  331.  
  332.  
  333. ΓòÉΓòÉΓòÉ 6.2. EtkCreate ΓòÉΓòÉΓòÉ
  334.  
  335.  
  336.   EtkCreate - 
  337.   (Create a E-Multi-Line Edit Control Window) 
  338.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  339.  
  340.      Create a new E-Multi-line edit control window containing specified 
  341.      file(s). 
  342.  
  343.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  344.           Γöé EtkCreate (  epm_p, hwnd_p , rc )
  345.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  346.  
  347.  Parameters 
  348.  
  349.      epm_p ( PEDITORINFO ) - input 
  350.         Pointer to Text Editor Information Structure. 
  351.  
  352.                  .---------------------------------------------------------------------------.
  353.                  |   Editor Information Structure defined in 'C'                             |
  354.                  |---------------------------------------------------------------------------|
  355.                  | typedef struct EDIT_INFO_TYPE {                                           |
  356.                  |    HAB       hab;           // application anchor block                   |
  357.                  |    HWND      hwndparent;    // handle to parent of edit window            |
  358.                  |    HWND      hwndowner;     // handle to owner of edit window             |
  359.                  |    PRECTL    pswp           // positioning of edit window                 |
  360.                  |    PSZ       filename;      // file to be edited (with wildcard)          |
  361.                  |    HPOINTER  hEditPtr;      // handle to editor pointer icon.             |
  362.                  |    HPOINTER  hMarkPtr;      // handle to mark pointer icon.               |
  363.                  |    PVOID     hEditorIcon;   // editor ICON.                               |
  364.                  |    ULONG     editorstyle;   // internal editor options                    |
  365.                  |    ULONG     pmstyle;       // PM standard window styles (FCF_xxxx)       |
  366.                  |    USHORT    font;          // - Not used in versions greater than 5.20   |
  367.                  |    PSZ       exfile;        // pre-compiled macro code file (EPM.EX)      |
  368.                  |    PSZ       *topmkr;       // top and bottom of file marker              |
  369.                  |    PSZ       *botmkr;       //                                            |
  370.                  |    SHORT     editid;        // unique window id specified for edit window |
  371.                  |    PSZ       exsearchpath;  // a set of paths to search for ex's files    |
  372.                  |    PSZ       exe_path;      // path where the application started         |
  373.                  |    HINI      hini;          // handle to an opened ini profile            |
  374.                  | } EDITORINFO;                                                             |
  375.                  |                                                                           |
  376.                  '---------------------------------------------------------------------------'
  377.         See Appendix A for a detailed description of the EDITORINFO structure. 
  378.  
  379.      hwnd_p ( PHWND) - output 
  380.         Pointer to E-MLE's client window. 
  381.  
  382.  Returns 
  383.  
  384.      rc  ( USHORT ) - 
  385.         TRUE if a error occurred during E-MLE window creation. 
  386.  
  387.  Remarks 
  388.  
  389.      This call creates a unique E-MLE window.  Each E-MLE is a complete new 
  390.      instance of the text editor.   Therefore, it knows little about any other 
  391.      E-MLE windows that have been previously created. Each E-MLE window has 
  392.      it's own marks, tabs, margins, and etc. 
  393.  
  394.      Starting with version 5.50, the E-MLE's use GPI fonts for text I/O. An 
  395.      E-MLE window can render text in multiple font faces and sizes. (See 
  396.      Appendix ???????) 
  397.  
  398.      An application can create as many E-MLE's as system memory will permit. 
  399.      Each E-MLE instance can contain a ring a files.  A RING can contain as 
  400.      many files as system memory will permit. 
  401.  
  402.  
  403. ΓòÉΓòÉΓòÉ 6.3. EtkDestroy ΓòÉΓòÉΓòÉ
  404.  
  405.  
  406.   EtkDestroy - 
  407.   (Destroy a Multi-line Edit Control Window) 
  408.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  409.  
  410.      Close a E-MLE window. 
  411.  
  412.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  413.           Γöé EtkDestroy (  hab, hwndOwner, hwndEdit  , rc )
  414.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  415.  
  416.  Parameters 
  417.  
  418.      hab ( HAB ) - input 
  419.         Anchor block 
  420.  
  421.      hwndOwner ( HWND ) - input 
  422.         Handle of the owner of the E-MLE window.  Usually this is the 
  423.         application client window. 
  424.  
  425.      hwndEdit ( HWND ) - input 
  426.         E-MLE window to destroy 
  427.  
  428.  Returns 
  429.  
  430.      rc ( USHORT ) - 
  431.         One of the following messages are returned. (These messages are defined 
  432.         in EDLL.H) 
  433.  
  434.  o EPM_RC_DESTROYOK    - E-MLE window has successfully closed. 
  435.  
  436.  o EPM_RC_DESTROYTIMEOUT - the interpreter has timed out because it was either 
  437.    running a very long command, or it was executing a defexit that had a 
  438.    problem. 
  439.  
  440.  o EPM_RC_DESTROYCANCEL  - the user did not wish to close the E-MLE window. 
  441.  
  442.  Remarks 
  443.  
  444.      Since E is a memory based editor, the destroy function will not effect the 
  445.      most recent copy of the text file on disk.  The destroy function generates 
  446.      a WM_DESTROY message.  It is this message that actually closes the edit 
  447.      window.  You may choose to send this message directly instead of using the 
  448.      destroy function.  It is important to check the return code when sending 
  449.      the E-MLE window a WM_DESTROY.  If the E-MLE window receives a destroy 
  450.      message, and a modified file exists in its ring, an EPM_EDIT_ASKTOCLOSE 
  451.      message is sent to the application.  (See EPM_EDIT_ASKTOCLOSE message in 
  452.      the section "Editor Toolkit Messages" ) This message gives the application 
  453.      a chance to display a dialog box asking the user if they want to "really 
  454.      close" the window. 
  455.  
  456.  
  457. ΓòÉΓòÉΓòÉ 6.4. EtkVersion ΓòÉΓòÉΓòÉ
  458.  
  459.  
  460.   EtkVersion - 
  461.   (Dynalink Version) 
  462.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  463.  
  464.      Get the version of the Editor dynalink library(ETKExxx.DLL) 
  465.  
  466.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  467.           Γöé EtkVersion (version_str,  )
  468.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  469.  
  470.  Parameters 
  471.  
  472.      version_str ( PSZ ) - output 
  473.         Pointer to a buffer of memory.  This will be filled with the current 
  474.         dynalink version. The return string is in the following format: 
  475.  
  476.                     byte [1]           - length of string to follow.
  477.                     byte [2 - length]  - Null terminated version string.
  478.  
  479.  Returns VOID 
  480.  
  481.  Remarks 
  482.  
  483.      A constant, 'EVERSION', is provided in the EDLL.H file.  This constant is 
  484.      to be compared to the results of the EtkVersion procedure.  An example 
  485.      follows: 
  486.  
  487.  Example 
  488.  
  489.               CHAR EDLLVersion[20];
  490.  
  491.               EtkVersion( EDLLVersion );              // Get Version from .DLL
  492.               vercmp=strcmp( EDLLVersion, EVERSION ); // compare version numbers
  493.               if (vercmp) {
  494.                  WinMessageBox ((HWND)HWND_DESKTOP,   // Display editor return code
  495.                                 (HWND)hwndAppFrame,
  496.                                 (PSZ)"Version Mismatch",
  497.                                 (PSZ)"Check ETKExxx.DLL version",
  498.                                 NULL,
  499.                                 MB_ICONEXCLAMATION
  500.                                );
  501.                  return(1);
  502.               }
  503.  
  504.  
  505. ΓòÉΓòÉΓòÉ 7. Special Access Functions- E-MLE Manipulation ΓòÉΓòÉΓòÉ
  506.  
  507.  
  508. ΓòÉΓòÉΓòÉ 7.1. Event Execution. ΓòÉΓòÉΓòÉ
  509.  
  510.  
  511. ΓòÉΓòÉΓòÉ 7.2. EtkExecuteCommand ΓòÉΓòÉΓòÉ
  512.  
  513.  
  514.   EtkExecuteCommand - 
  515.   (Execute an E -Command) 
  516.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  517.  
  518.       This function will execute any predefined command. 
  519.  
  520.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  521.           Γöé EtkExecuteCommand (  hwndEdit, command , rc )
  522.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  523.  
  524.  Parameters 
  525.  
  526.      hwndEdit  ( HWND ) - input 
  527.         Window handle to the E-MLE in which the specified command will execute. 
  528.  
  529.      command  ( PSZ ) - input 
  530.         An asciiz command string that is defined as either an internal command, 
  531.         an E macro, or a REXX macro. 
  532.  
  533.  Returns 
  534.  
  535.      rc ( ULONG ) - 
  536.         TRUE if action failed. 
  537.  
  538.  Remarks 
  539.  
  540.      This is one of the more versatile commands available in the E Toolkit. 
  541.      Three classes of commands can be executed: 
  542.  
  543.  o Internal Commands. (examples - SAVE, L[ocate], and C[hange]). 
  544.  o Predefined E macros. (examples - ADD, DRAW, and GET) 
  545.  o REXX macros commands. (examples - RX SORT.ERX, RX ADDMENU.ERX, RX NEW.ERX) 
  546.  An example of how to use this function follows. 
  547.  
  548.  Example 
  549.  
  550.               {
  551.                 HWND hwndEdit=QueryEditHandle( );
  552.  
  553.                 // issue a "save" command to an E-MLE.   The data is saved in
  554.                 // a file called temp.tmp.
  555.                 EtkExecuteCommand( hwndEdit, "SAVE temp.tmp") ;
  556.               }
  557.  
  558.  
  559. ΓòÉΓòÉΓòÉ 7.3. EtkProcessEditKey ΓòÉΓòÉΓòÉ
  560.  
  561.  
  562.   EtkProcessEditKey - 
  563.   (Execute a editor action) 
  564.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  565.  
  566.      Execute a primitive editor action. 
  567.  
  568.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  569.           Γöé EtkProcessEditKey (  hwndEdit, key , rc )
  570.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  571.  
  572.      hwndEdit  ( HWND ) - input 
  573.         Window handle of the E-MLE. 
  574.  
  575.      key ( USHORT ) - input 
  576.         Built in key primitives: 
  577.  
  578.  ADJUST_BLOCK 
  579.  BACKTAB   Tab to the left. 
  580.  BACKTAB_WORD Tab to the left one word. 
  581.  BEGIN_LINE Move the cursor to the beginning of the line. 
  582.  BOTTOM    Move the cursor to the last line in the file. 
  583.  COPY_MARK Copy the current selection to the cursor location. 
  584.  DELETE_CHAR Delete the character in which the cursor is located. 
  585.  DELETE_LINE Delete the line in which the cursor is located. 
  586.  DELETE_MARK Delete the current selection. 
  587.  DOWN      Scroll down one line. 
  588.  END_LINE  Move the cursor to the end of the current line. 
  589.  ERASE_END_LINE Erase from the cursor to the end of the line. 
  590.  INSERT_LINE Insert a new line after the cursor. 
  591.  INSERT_TOGGLE Toggle between insert and replace cursor. 
  592.  JOIN      Join next line with the line in which the cursor is located. 
  593.  LEFT      Scroll one character to the left. 
  594.  MOVE_MARK Move the current selection to the cursor location. 
  595.  NEXT_FILE Go to the next file in the Ring. 
  596.  OVERLAY_BLOCK Overlay the current block selection to the cursor location. 
  597.  PAGE_DOWN Scroll one page down. 
  598.  PAGE_UP   Scroll one page up. 
  599.  PREVFILE_OP Go to the previous file in the Ring. 
  600.  REFLOW    Reflow the text according to the margins settings. 
  601.  REPEAT_FIND Repeat the last find. 
  602.  RIGHT     Scroll right one character. 
  603.  RUBOUT    Move cursor to the left and delete character. 
  604.  SHIFT_LEFT Shift the selected text one character to the left. 
  605.  SHIFT_RIGHT Shift the selected text one character to the right. 
  606.  SPLIT     Split the current line at the cursor. 
  607.  TAB       Move cursor to the next tab position. 
  608.  TAB_WORD  Tab to the right one word. 
  609.  TOP       Move the cursor to the first line in the file. 
  610.  UNDO_LINE Return the current line to its original state. 
  611.  UNMARK    Clear the current selection. 
  612.  UP        Scroll up one line. 
  613.  
  614.  Remarks 
  615.  
  616.  Example 
  617.  
  618.  
  619. ΓòÉΓòÉΓòÉ 7.4. Text Manipulation ΓòÉΓòÉΓòÉ
  620.  
  621.  
  622. ΓòÉΓòÉΓòÉ 7.5. EtkQueryText ΓòÉΓòÉΓòÉ
  623.  
  624.  
  625.   EtkQueryText - 
  626.   (Retrieve a line) 
  627.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  628.  
  629.      Retrieve a line of text and its associated attributes. 
  630.  
  631.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  632.           Γöé EtkQueryText ( hwndEdit, fileid, linenum, Text, Attrs, ALAttr , rc )
  633.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  634.  
  635.  Parameters 
  636.  
  637.      hwndEdit  ( HWND ) - input 
  638.         Window handle to the E-MLE that will contain the selected text. 
  639.  
  640.      fileid  ( ULONG ) - input 
  641.         the fileid of the file containing the specified line.  If 0 is 
  642.         specified, the line will be retrieved from the visible file. 
  643.  
  644.      linenum  ( ULONG ) - input 
  645.         line number of interest. 
  646.  
  647.      Text  ( PSZ * ) - output 
  648.         Returns an indirect pointer to the text found on the specified line. 
  649.  
  650.      Attrs ( PVOID) - output 
  651.         returns a pointer to an attribute structure that describes the 
  652.         attributes (i.e. font, color) associated with that line. 
  653.  
  654.      ALAttrs  ( PVOID ) - output 
  655.         returns a pointer to an attribute structure that describes the 
  656.         attributes (i.e. font, color) associated with that line. 
  657.  
  658.  Returns 
  659.  
  660.      rc ( ULONG ) - 
  661.         TRUE if action failed. 
  662.  
  663.  Remarks 
  664.  
  665.            ****************************************************************************
  666.            ***  TODO -  Need a section on how to interpret the attribute structures ***
  667.            ****************************************************************************
  668.  
  669.  Example 
  670.  
  671.  
  672. ΓòÉΓòÉΓòÉ 7.6. EtkDeleteText ΓòÉΓòÉΓòÉ
  673.  
  674.  
  675.   EtkDeleteText - 
  676.  (Delete text) 
  677.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  678.  
  679.      Delete an area of text. 
  680.  
  681.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  682.           Γöé  ( hwndEdit, fileid, startline, number_oflines  , rc )
  683.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  684.  
  685.  Parameters 
  686.  
  687.      hwndEdit  ( HWND ) - input 
  688.         Window handle to the E-MLE. 
  689.  
  690.      fileid  ( ULONG) - input 
  691.         the fileid of the file containing the specified line.  If filid=0 is 
  692.         specified, the line will be retrieved from the visible file. 
  693.  
  694.      startline ( ULONG ) - input 
  695.         starting line number 
  696.  
  697.      num_of_lines ( ULONG ) - input 
  698.         number of lines to delete.  If (-1L) then lines are deleted from the 
  699.         start line through the last line in the file. 
  700.  
  701.  Returns 
  702.  
  703.      rc ( ULONG ) - 
  704.         TRUE if action failed. 
  705.  
  706.  Remarks 
  707.  
  708.  Example 
  709.  
  710.  
  711. ΓòÉΓòÉΓòÉ 7.7. EtkReplaceText ΓòÉΓòÉΓòÉ
  712.  
  713.  
  714.   EtkReplaceText - 
  715.   (Replace a line) 
  716.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  717.  
  718.      Replace a line with a new single attributed string 
  719.  
  720.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  721.           Γöé EtkReplaceText ( hwndEdit, fileid, linenum, AttrString, rc )
  722.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  723.  
  724.  Parameters 
  725.  
  726.      hwndEdit (HWND ) - input 
  727.         Window handle to the E-MLE that will contain the selected text. 
  728.  
  729.      fileid  ( ULONG ) - input 
  730.         the fileid of the file containing the specified line.  If 0 is 
  731.         specified, the line will be retrieved from the visible file. 
  732.  
  733.      linenum  ( ULONG ) - input 
  734.         starting line number 
  735.  
  736.      Attrs  ( PVOID ) - input 
  737.         a pointer to an attribute structure that describes the attributes (i.e. 
  738.         font, color) associated with that line. 
  739.  
  740.  Returns 
  741.  
  742.      rc ( ULONG ) - 
  743.         TRUE if action failed. 
  744.  
  745.  Remarks 
  746.  
  747.            ****************************************************************************
  748.            ***  TODO -  Need a section on how to interpret the attribute structures ***
  749.            ****************************************************************************
  750.  
  751.  Example 
  752.  
  753.  
  754. ΓòÉΓòÉΓòÉ 7.8. EtkInsertText ΓòÉΓòÉΓòÉ
  755.  
  756.  
  757.   EtkInsertText - 
  758.  (Add a line) 
  759.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  760.  
  761.      Insert a single attributed string 
  762.  
  763.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  764.           Γöé EtkInsertText ( hwndEdit, fileid, linenum, AttrString, rc )
  765.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  766.  
  767.  Parameters 
  768.  
  769.      hwndEdit  ( HWND ) - input 
  770.         Window handle to the E-MLE that will contain the selected text. 
  771.  
  772.      fileid  ( ULONG ) - input 
  773.         the fileid of the file containing the specified line.  If 0 is 
  774.         specified, the line will be retrieved from the visible file. 
  775.  
  776.      linenum  ( ULONG ) - input 
  777.         starting line number 
  778.  
  779.      Attrs  ( PVOID ) - input 
  780.         A pointer to an attribute structure that describes the attributes. 
  781.         (i.e. font, color) associated with that line. 
  782.  
  783.  Returns 
  784.  
  785.      rc ( ULONG ) - 
  786.         TRUE if action failed. 
  787.  
  788.  Remarks 
  789.  
  790.            ****************************************************************************
  791.            ***  TODO -  Need a section on how to interpret the attribute structures ***
  792.            ****************************************************************************
  793.  
  794.  Example 
  795.  
  796.  
  797. ΓòÉΓòÉΓòÉ 7.9. EtkQueryTextBuffer ΓòÉΓòÉΓòÉ
  798.  
  799.  
  800.   EtkQueryTextBuffer - 
  801.   (Query Text Buffer) 
  802.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  803.  
  804.       Retrieve a stream of text within a specified line range. 
  805.  
  806.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  807.           Γöé EtkQueryTextBuffer ( hwndEdit, startline, lastline, TotalLen, buffer , characters )
  808.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  809.  
  810.  Parameters 
  811.  
  812.      hwndEdit  ( HWND ) - input 
  813.         Window handle of the E-MLE. 
  814.  
  815.      startline  ( ULONG ) - input 
  816.         First line in text range. 
  817.  
  818.      lastline  ( ULONG ) - input 
  819.         Last Line in range. 
  820.  
  821.      TotalLen ( ULONG ) - input 
  822.         Size of buffer 
  823.  
  824.      buffer ( PSZ ) - output 
  825.         Buffer where text stream will be returned. 
  826.  
  827.  Returns 
  828.  
  829.      characters (ULONG) - 
  830.         The number of characters in the buffer is returned. If 0 is returned, 
  831.         it is likely that a problem occured. (Most likely an invalid line 
  832.         number) 
  833.  
  834.  Remarks 
  835.  
  836.      If startline and lastline are zero (0), the entire file will be returned. 
  837.  
  838.      The Buffer contains a stream of characters where each line ends in CR-LF. 
  839.  
  840.  
  841. ΓòÉΓòÉΓòÉ 7.10. EtkInsertTextBuffer ΓòÉΓòÉΓòÉ
  842.  
  843.  
  844.   EtkInsertTextBuffer - 
  845.  (Insert Text Buffer) 
  846.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  847.  
  848.      Enter a stream of text starting at a specified point. 
  849.  
  850.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  851.           Γöé EtkInsertTextBuffer ( hwndEdit, startline, TotalLen, Text , lines )
  852.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  853.  
  854.  Parameters 
  855.  
  856.      hwndEdit ( HWND ) - input 
  857.         Window handle of the E-MLE. 
  858.  
  859.      startline ( ULONG ) - input 
  860.         Insert starting at this line. 
  861.  
  862.      TotalLen ( ULONG ) - input 
  863.         Size of buffer 
  864.  
  865.      Text ( PSZ ) - input 
  866.         Text stream to insert. 
  867.  
  868.  Returns 
  869.  
  870.      lines ( ULONG ) - 
  871.         The number of lines inserted in to the E-MLE. If 0 is returned, it is 
  872.         likely that a problem occured. (Most likely an invalid line number) 
  873.  
  874.  Remarks 
  875.  
  876.      If startline is zero (0), the Text is inserted at the current cursor 
  877.      position. 
  878.  
  879.      The Text buffer should contain a stream of characters where each line ends 
  880.      in CR-LF. 
  881.  
  882.  Example 
  883.  
  884.              {
  885.                UCHAR string[512],
  886.                strcpy(string, "1: This is a test\r\n2: This is line 2\r\n");
  887.                EtkInsertTextBuffer( hwndEdit, 1, strlen(string), string);
  888.              }
  889.  
  890.  
  891. ΓòÉΓòÉΓòÉ 7.11. EtkFindAttribute. ΓòÉΓòÉΓòÉ
  892.  
  893.  
  894.   EtkFindAttribute. - 
  895.   (Retrieve a line attribute) 
  896.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  897.  
  898.      Search for an attribute associated with a line. 
  899.  
  900.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  901.           Γöé EtkFindAttribute ( hwndEdit, fileid, linenum, Column, ColumnOffset, Attribute, pFound , rc )
  902.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  903.  
  904.  Parameters 
  905.  
  906.      hwndEdit  ( HWND ) - input 
  907.         Window handle to the E-MLE that will contain the selected text. 
  908.  
  909.      fileid  ( ULONG) - input 
  910.         the fileid of the file containing the specified line.  If 0 is 
  911.         specified, the line will be retrieved from the visible file. 
  912.  
  913.      linenum  ( ULONG ) - input 
  914.         starting line number 
  915.  
  916.      Column ( USHORT ) - input 
  917.         starting column 
  918.  
  919.      ColumnOffset ( USHORT ) - input 
  920.         Column Offset. 
  921.  
  922.      Attrs  ( PVOID ) - input 
  923.         A pointer to an attribute structure that describes the attributes (i.e. 
  924.         font, color) associated with that line. 
  925.  
  926.      pFound ( BOOLEAN *) - output 
  927.         found flag. 
  928.  
  929.  Returns 
  930.  
  931.      rc ( ULONG ) - 
  932.         TRUE if action failed. 
  933.  
  934.  Remarks 
  935.  
  936.            ****************************************************************************
  937.            ***  TODO -  Need a section on how to interpret the attribute structures ***
  938.            ****************************************************************************
  939.  
  940.  Example 
  941.  
  942.  
  943. ΓòÉΓòÉΓòÉ 7.12. Text Selection. ΓòÉΓòÉΓòÉ
  944.  
  945.  
  946. ΓòÉΓòÉΓòÉ 7.13. EtkQuerySelectionType ΓòÉΓòÉΓòÉ
  947.  
  948.  
  949.   EtkQuerySelectionType - 
  950.   (Query Current Selection Type) 
  951.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  952.  
  953.      Returns the current selection type. The E Toolkit supports three types of 
  954.      text selection.  Character, Line, and Block. 
  955.  
  956.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  957.           Γöé EtkQuerySelectionType ( hwndEdit, marktype, rc )
  958.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  959.  
  960.  Parameters 
  961.  
  962.      hwndEdit  ( HWND ) - input 
  963.         Window handle of the E-MLE. 
  964.  
  965.      marktype ( PUSHORT) - output 
  966.         The E Toolkit will fill this value with a constant that represents the 
  967.         type of mark contained in the visible file. 
  968.  
  969.                    #define LINEMARK    0
  970.                    #define CHARMARK    1
  971.                    #define BLOCKMARK   2
  972.  
  973.                    #define CHARMARKG   3
  974.                    #define BLOCKMARKG  4
  975.                    #define NOMARK     -1
  976.  
  977.  Returns 
  978.  
  979.      rc ( USHORT) - 
  980.         TRUE if action failed. 
  981.  
  982.  Remarks 
  983.  
  984.  Example 
  985.  
  986.  
  987.               {
  988.                 HWND    hwndEdit=QueryEditHandle( );
  989.                 USHORT  marktype;
  990.                 UCHAR   outmsg[MAXSTR];
  991.  
  992.                 strcpy( outmsg, "Your file contains ");
  993.                 EtkQuerySelectionType( hwndEdit, &marktype);
  994.                 switch (marktype) {
  995.                    case  LINEMARK:   strcat( outmsg, "a Line Mark");             break;
  996.                    case  CHARMARK:   strcat( outmsg, "a Character Mark");        break;
  997.                    case  CHARMARKG:  strcat( outmsg, "a Special Character Mark");break;
  998.                    case  BLOCKMARK:  strcat( outmsg, "a Block Mark");            break;
  999.                    case  BLOCKMARKG: strcat( outmsg, "a Special Block Mark");    break;
  1000.                    default:
  1001.                          strcat( outmsg, "no mark.");
  1002.                          break;
  1003.                 }
  1004.  
  1005.               }
  1006.  
  1007.  
  1008. ΓòÉΓòÉΓòÉ 7.14. EtkQuerySelection ΓòÉΓòÉΓòÉ
  1009.  
  1010.  
  1011.   EtkQuerySelection - 
  1012.   (Selection Location) 
  1013.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1014.  
  1015.      Returns the coordinates of the selected text area. 
  1016.  
  1017.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1018.           Γöé EtkQuerySelection ( hwndEdit, firstline, lastline, firstcol, lastcol, markfileid, respectattributes, relative2file , rc )
  1019.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1020.  
  1021.  Parameters 
  1022.  
  1023.      hwndEdit ( HWND ) - input 
  1024.         Window handle of the E-MLE that contains selected text. 
  1025.  
  1026.      firstline, lastline ( PULONG ) - output 
  1027.         returns the first and last lines in the selected area. 
  1028.  
  1029.      firstcol, lastcol ( PUSHORT ) - output 
  1030.         returns the first and last columns in the selected area. 
  1031.  
  1032.      markfileid  ( PULONG ) - output 
  1033.         returns the fileid of the file containing the selected text. 
  1034.  
  1035.      respectattributes  ( PUSHORT ) - output 
  1036.         If TRUE, Font and color attribute information will be taken into 
  1037.         consideration. 
  1038.  
  1039.      relative2file  ( PUSHORT ) - output 
  1040.         Should always be set to TRUE. 
  1041.  
  1042.  Returns 
  1043.  
  1044.      rc (USHORT) - 
  1045.         TRUE if action failed. 
  1046.  
  1047.  Remarks 
  1048.  
  1049.  Example 
  1050.  
  1051.  
  1052.               {
  1053.                 ULONG  firstline, lastline;
  1054.                 USHORT firstcol, lastcol;
  1055.                 LONG   markfileid;
  1056.                 SHORT  marktype;
  1057.                 USHORT respectattributes=FALSE, relative2file=TRUE;
  1058.  
  1059.                 EtkQuerySelectionType( hwndEdit, &marktype);
  1060.  
  1061.                 if (marktype!=NOMARK) {
  1062.                    EtkQuerySelection(QueryActiveEdit(),
  1063.                                     &firstline, &lastline,
  1064.                                     &firstcol,  &lastcol,
  1065.                                     &markfileid,
  1066.                                     respectattributes, relative2file);
  1067.                 }
  1068.               }
  1069.  
  1070.  
  1071. ΓòÉΓòÉΓòÉ 7.15. EtkSetSelection ΓòÉΓòÉΓòÉ
  1072.  
  1073.  
  1074.  EtkSetSelection - 
  1075.  (Select Text) 
  1076.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1077.  
  1078.      Specifiy the type of selection along with the area of text to be selected. 
  1079.  
  1080.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1081.           Γöé EtkSetSelection (  hwndEdit, firstline, lastline, firstcol, lastcol, firstoff, lastoff, marktype, fileid , rc )
  1082.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1083.  
  1084.  Parameters 
  1085.  
  1086.      hwndEdit  ( HWND ) - input 
  1087.         Window handle to the E-MLE that will contain the selected text. 
  1088.  
  1089.      firstline, lastline  ( ULONG ) - input 
  1090.         The first and last lines in the selected area. 
  1091.  
  1092.      firstcol, lastcol  ( USHORT ) - input 
  1093.         The first and last columns in the selected area. 
  1094.  
  1095.      firstoff, lastoff  ( USHORT ) - input 
  1096.         The attribute offset associated with the first and last column.  (If 
  1097.         color or font attributes are not being used, set to 0) 
  1098.  
  1099.      marktype  ( USHORT ) - input 
  1100.  
  1101.                    #define LINEMARK    0
  1102.                    #define CHARMARK    1
  1103.                    #define BLOCKMARK   2
  1104.  
  1105.                    #define CHARMARKG   3
  1106.                    #define BLOCKMARKG  4
  1107.                    #define NOMARK     -1
  1108.  
  1109.      markfileid  ( USHORT ) - input 
  1110.         the fileid of the file containing the selected text.  If -1 is 
  1111.         specified, the text will be selected in the visible file. 
  1112.  
  1113.  Returns 
  1114.  
  1115.      rc (USHORT) - 
  1116.         TRUE if action failed. 
  1117.  
  1118.  Remarks 
  1119.  
  1120.  Example 
  1121.  
  1122.               {
  1123.                 ULONG  firstline, lastline;
  1124.                 USHORT firstcol, lastcol;
  1125.                 LONG   markfileid;
  1126.                 SHORT  marktype;
  1127.                 USHORT respectattributes=FALSE, relative2file=TRUE;
  1128.  
  1129.                 EtkQuerySelectionType( hwndEdit, &marktype);
  1130.  
  1131.                 if (marktype!=NOMARK) {
  1132.                    HWND hwndEdit=QueryActiveEdit();
  1133.                    EtkQuerySelection(hwndEdit,
  1134.                                     &firstline, &lastline,
  1135.                                     &firstcol,  &lastcol,
  1136.                                     &markfileid,
  1137.                                     respectattributes, relative2file);
  1138.                    // extend the mark one line.
  1139.                    EtkSetSelection(hwndEdit,
  1140.                                     firstline, lastline+1,
  1141.                                     firstcol,  lastcol,  0, 0,
  1142.                                     marktype,
  1143.                                     markfileid);
  1144.                 }
  1145.               }
  1146.  
  1147.  
  1148. ΓòÉΓòÉΓòÉ 7.16. File Information ΓòÉΓòÉΓòÉ
  1149.  
  1150.  
  1151. ΓòÉΓòÉΓòÉ 7.17. EtkQueryFileID ΓòÉΓòÉΓòÉ
  1152.  
  1153.  
  1154.  EtkQueryFileID - 
  1155.   (Query a files identifier) 
  1156.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1157.  
  1158.      Retrieve the visible files file identifier. 
  1159.  
  1160.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1161.           Γöé EtkQueryFileID (  hwndEdit, fileid , rc )
  1162.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1163.  
  1164.  Parameters 
  1165.  
  1166.      hwndEdit ( HWND ) - input 
  1167.         Window handle to the E-MLE that will contain the selected text. 
  1168.  
  1169.      fileid  ( PUSHORT ) - input 
  1170.         returns the fileid of the visible file. 
  1171.  
  1172.  Returns 
  1173.  
  1174.      rc (USHORT) - 
  1175.         TRUE if action failed. 
  1176.  
  1177.  Remarks 
  1178.  
  1179.      The file identifier is an constant that is used by certian functions to 
  1180.      identify a particular file in an E-MLE window Ring. 
  1181.  
  1182.  Example 
  1183.  
  1184.  
  1185. ΓòÉΓòÉΓòÉ 7.18. EtkSetFileField ΓòÉΓòÉΓòÉ
  1186.  
  1187.  
  1188.  EtkSetFileField - 
  1189.   Set some file characteristic 
  1190.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1191.  
  1192.      Set information pertaining to some aspect of a file. (i.e. Margin, Name, 
  1193.      etc) 
  1194.  
  1195.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1196.           Γöé EtkSetFileField (hwndEdit, field, fileid, indata , rc )
  1197.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1198.  
  1199.  Parameters 
  1200.  
  1201.      hwndEdit ( HWND ) - input 
  1202.         Window handle of the E-MLE. 
  1203.  
  1204.      field.  ( ULONG) - input 
  1205.         See Appendix A1 for field constants and values expected by each field. 
  1206.  
  1207.      fileid  (ULONG) - input 
  1208.         the fileid 
  1209.  
  1210.      indata  (PVOID) - input 
  1211.         The input data varies depending on the field being set. See Appendix 
  1212.         A-1 for field constants and values expected by each field. 
  1213.  
  1214.  Returns 
  1215.  
  1216.      rc (USHORT) - 
  1217.         TRUE if action failed. 
  1218.  
  1219.  Remarks 
  1220.  
  1221.  Example 
  1222.  
  1223.              {
  1224.                 UCHAR s[MAXSTR];
  1225.                 ULONG Browse;
  1226.  
  1227.                 Browse = 0L;   // turn OFF browse mode - the file can now be modified.
  1228.                 EtkSetFileField(hwndMLE,(ULONG)READONLY_FIELD,(ULONG)0,(PVOID)Browse);
  1229.  
  1230.                 // Insert a stream of text...
  1231.                 strcpy( s,"Hello World\r\nAnother Line\r\nAnd another...");
  1232.                 EtkInsertTextBuffer( hwndMLE, 1, strlen(s), s);
  1233.  
  1234.                 Browse = 1L;   // turn ON browse mode - the file is now read only!
  1235.                 EtkSetFileField(hwndMLE,(ULONG)READONLY_FIELD,(ULONG)0,(PVOID)Browse);
  1236.              }
  1237.  
  1238.  
  1239. ΓòÉΓòÉΓòÉ 7.19. EtkQueryFileField ΓòÉΓòÉΓòÉ
  1240.  
  1241.  
  1242.  EtkQueryFileField - 
  1243.   (Query some file characteristic) 
  1244.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1245.  
  1246.      Query information pertaining to some aspect of a file. (i.e. Margin, Name, 
  1247.      etc) 
  1248.  
  1249.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1250.           Γöé EtkQueryFileField ( hwndEdit, field, fileid, returndata , rc )
  1251.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1252.  
  1253.  Parameters 
  1254.  
  1255.      hwndEdit  (HWND) - input 
  1256.         Window handle of the E-MLE. 
  1257.  
  1258.      field.  (ULONG) - input 
  1259.         See Appendix A1 for field constants and values expected by each field. 
  1260.  
  1261.      fileid  (ULONG) - input 
  1262.         the fileid 
  1263.  
  1264.      returndata  (PVOID) - output 
  1265.         data returned. This data varies depending on the field being queried. 
  1266.         See Appendix A1 for field constants and values expected by each field. 
  1267.  
  1268.  Returns 
  1269.  
  1270.      rc (USHORT) - 
  1271.         TRUE if action failed. 
  1272.  
  1273.  Remarks 
  1274.  
  1275.  Example 
  1276.  
  1277.             {
  1278.                ULONG numlines;
  1279.  
  1280.                // query the number of lines in a given file.
  1281.                EtkQueryFileField(hwndMLE,(ULONG)LAST_FIELD,(ULONG)0,(PVOID)&numlines);
  1282.             }
  1283.  
  1284.  
  1285. ΓòÉΓòÉΓòÉ 8. E Toolkit Messages ΓòÉΓòÉΓòÉ
  1286.  
  1287.  
  1288. Purpose The following messages are used to interact with an edit window object. 
  1289. Remarks  The numbering of the following messages are: (using C and PM 
  1290. standards) 
  1291.  
  1292. EPM_BROADCASTHELP
  1293. EPM_EDIT_OPTION
  1294. EPM_EDIT_PLAYKEY
  1295. EPM_EDIT_ACTIVATEFILEID
  1296. EPM_EDIT_POSTDONE
  1297. EPM_EDIT_ACTIVEHWND
  1298. EPM_EDIT_ASKTOCLOSE
  1299. EPM_EDIT_ASKTODONE
  1300. EPM_EDIT_ASKTOFAILED
  1301. EPM_EDIT_QUERYRECORDKEY
  1302. EPM_EDIT_ASKTOQUIT
  1303. EPM_EDIT_QUERY_HELP_INSTANCE
  1304. EPM_EDIT_CHANGEFONT * (to be implemented for 5.50)
  1305. EPM_EDIT_RECORDKEY
  1306. EPM_EDIT_CHAR
  1307. EPM_EDIT_RETCODE
  1308. EPM_EDIT_CLIPBOARDCOPY
  1309. EPM_EDIT_SAYERROR
  1310. EPM_EDIT_CLIPBOARDPASTE
  1311. EPM_EDIT_COMMAND
  1312. EPM_EDIT_SHOW
  1313. EPM_EDIT_COMMAND2
  1314. EPM_EDIT_TURN_OFF_HIGHLIGHT
  1315. EPM_EDIT_CONTROLTOGGLE * ( need access to CONTROL constants.)
  1316. EPM_EDIT_CURSORMOVE
  1317. EPM_EDIT_VERSION
  1318. EPM_EDIT_WIN2DOC * (Jason needs to document this one.)
  1319. EPM_EDIT_DESTROYNOTIFY
  1320. EPM_EDIT_DESTROYRC
  1321. EPM_EXTRAWINDOW_REFRESH
  1322. EPM_EDIT_DOC2WIN * (Jason needs to document this one.)
  1323. EPM_FRAME_MESSAGELINE
  1324. EPM_FRAME_STATUSLINE
  1325. EPM_EDIT_ENDRECORDKEY
  1326. EPM_EDIT_TASKLIST
  1327.  
  1328. ------------- TODO ----------------
  1329. EPM_EDIT_EXEC_DYNALINK * (GAC has to document this one.)
  1330. EPM_GET_ERROR_MESSAGE
  1331. EPM_EDIT_EXEC_PROC
  1332. EPM_IS_HELP_LOADED
  1333. EPM_EDIT_GETMEM
  1334. EPM_PRINT_RENDERPAGE
  1335. EPM_EDIT_GETPROFILE
  1336. EPM_PRINT_RENDERPAGERC
  1337. EPM_EDIT_HELPNOTIFY
  1338. EPM_QHELP_TABLE
  1339. EPM_EDIT_ID
  1340. EPM_QUERY_GLOBDATA
  1341. EPM_EDIT_MINMAXFRAME
  1342. EPM_SEND_MACROS_ERRORS
  1343. EPM_EDIT_NEWFILE
  1344. -----------------------------------
  1345.  Note:  Editor messages are either send messages or receive messages. The send 
  1346. messages are sent from your application to the edit window. The receive 
  1347. messages are sent by an edit window to the registered owner's window procedure. 
  1348.  
  1349.  
  1350. ΓòÉΓòÉΓòÉ 8.1. EPM_FRAME_STATUSLINE ΓòÉΓòÉΓòÉ
  1351.  
  1352.  
  1353. ΓòÉΓòÉΓòÉ 8.1.1. (Update Status Line) - Sent TO an E-MLE window ΓòÉΓòÉΓòÉ
  1354.  
  1355.  
  1356. Purpose Updates the status line's template and color. 
  1357. Message Parameter 1  status_template (PSZ) Status temple string to be filled in 
  1358. by status line. (See Remarks for status_template format) 
  1359. Message Parameter 2  statusline_color( USHORT)  (LOCHAR)foreground color 
  1360. (HICHAR)background color 
  1361. Return   NULL 
  1362. Remarks 
  1363.  
  1364. If a color is not specified, then the current color is used. The pointer passed 
  1365. in Message Parameter 1 IS FREED by this message. It must be allocated using 
  1366. DosAllocSeg, because it is freed using DosFreeSeg. 
  1367.  
  1368. The following tags are supported in the status template: 
  1369.  
  1370.  %l        current line number. 
  1371.  %c        current column number. 
  1372.  %f        files in E-MLE Ring. 
  1373.  %m        displays "Modified" if visible file is modified. 
  1374.  %i        Displays "Insert" or "Replace" 
  1375.  %z - %x   Displays character at cursor is ascii(%z) or in hex(%x). 
  1376.  %s        Total number of lines in file. 
  1377.  %a        Autosave value. 
  1378.  
  1379.  For example, if the following template string was passed: 
  1380.  
  1381.   Line=%l  Column=%C  Mode=%i,  The Ring contains %f
  1382.  The status line would display: 
  1383.  
  1384.   Line=1290  Column=72  Mode=Insert, The Ring contains 2 Files.
  1385.  
  1386.  
  1387. ΓòÉΓòÉΓòÉ 8.2. EPM_FRAME_MESSAGELINE ΓòÉΓòÉΓòÉ
  1388.  
  1389.  
  1390. ΓòÉΓòÉΓòÉ 8.2.1. (Update Message Line) - Sent TO an E-MLE window ΓòÉΓòÉΓòÉ
  1391.  
  1392.  
  1393. Purpose Updates the message line's text and color. 
  1394. Message Parameter 1  message (PSZ) string to appear on message line 
  1395. Message Parameter 2  messageline color( USHORT)  (LOCHAR)foreground color 
  1396. (HICHAR)background color 
  1397. Return   NULL 
  1398. Remarks 
  1399.  
  1400. If a color is not specified, then the current color is used. The pointer passed 
  1401. in Message Parameter 1 IS FREED by this message.  It must be allocated using 
  1402. DosAllocSeg, because it is freed using DosFreeSeg. 
  1403.  
  1404.  
  1405. ΓòÉΓòÉΓòÉ 8.3. EPM_EDIT_VERSION ΓòÉΓòÉΓòÉ
  1406.  
  1407.  
  1408. ΓòÉΓòÉΓòÉ 8.3.1. (E-MLE Version) - Sent TO an E-MLE window ΓòÉΓòÉΓòÉ
  1409.  
  1410.  
  1411. Purpose Return the E-Toolkit version number. 
  1412. Message Parameter 1  not used (LONG) 
  1413. Message Parameter 2  not used() 
  1414. Return   NULL 
  1415. Remarks 
  1416.  
  1417.  
  1418. ΓòÉΓòÉΓòÉ 8.4. EPM_EDIT_TURN_OFF_HIGHLIGHT ΓòÉΓòÉΓòÉ
  1419.  
  1420.  
  1421. ΓòÉΓòÉΓòÉ 8.4.1. (Turn Off Highlight) - Sent TO an E-MLE window ΓòÉΓòÉΓòÉ
  1422.  
  1423.  
  1424. Purpose Clear text circled by the CIRCLEIT macro. 
  1425. Message Parameter 1  not used (LONG) 
  1426. Message Parameter 2  not used() 
  1427. Return   NULL 
  1428. Remarks 
  1429.  
  1430.  
  1431. ΓòÉΓòÉΓòÉ 8.5. EPM_EDIT_QUERY_HELP_INSTANCE ΓòÉΓòÉΓòÉ
  1432.  
  1433.  
  1434. ΓòÉΓòÉΓòÉ 8.5.1. (Query Help Instance) - Sent FROM an E-MLE window ΓòÉΓòÉΓòÉ
  1435.  
  1436.  
  1437. Purpose The following is a request from the etoolkit for the handle of the help 
  1438. instance 
  1439. Message Parameter 1  not used (LONG) 
  1440. Message Parameter 2  not used() 
  1441. Return   NULL 
  1442. Remarks 
  1443.  
  1444. This is how EPM.EXE handles this messages. 
  1445.  
  1446.     case EPM_EDIT_QUERY_HELP_INSTANCE:
  1447.        if(!GlobData->hwndHelpInstance) {
  1448.           GlobData->hwndHelpInstance = WinCreateHelpInstance(GlobData->hAB,&GlobData->hmiHelpData);
  1449.        }
  1450.        return(GlobData->hwndHelpInstance);
  1451.        break;
  1452.  
  1453.  
  1454. ΓòÉΓòÉΓòÉ 8.6. EPM_BROADCASTHELP ΓòÉΓòÉΓòÉ
  1455.  
  1456.  
  1457. ΓòÉΓòÉΓòÉ 8.6.1. (Broadcast Help) - Sent FROM E-MLE ΓòÉΓòÉΓòÉ
  1458.  
  1459.  
  1460. Purpose EPM_BROADCASTHELP is sent a E-MLE application when the help instance 
  1461. has been initialized.  To insure that all existing edit windows add their 
  1462. helpsub tables to the help instance EPM_QHELP_TABLE is broadcasted to all edit 
  1463. windows on the desktop informing them that help has been loaded.  If no edit 
  1464. windows are running then EPM_EDIT_QUERY_HELP_INSTANCE is issued to the shell in 
  1465. order to create the help instance. 
  1466. Message Parameter 1  not used (LONG) 
  1467. Message Parameter 2  not used() 
  1468. Return   NULL 
  1469. Remarks 
  1470.  
  1471. This is how EPM.EXE handles this messages. 
  1472.  
  1473.    case EPM_BROADCASTHELP:
  1474.        {
  1475.          USHORT rc;
  1476.          rc=ERESBroadcastMsgToEditWindows(GlobData, EPM_QHELP_TABLE, 0L,0L);
  1477.          if(!rc) {
  1478.              WinSendMsg(GlobData->eres.hwndAppClient,
  1479.                         EPM_EDIT_QUERY_HELP_INSTANCE, 0L, 0L);
  1480.          }
  1481.        }
  1482.        break;
  1483.  
  1484.  
  1485. ΓòÉΓòÉΓòÉ 8.7. EPM_EDIT_DELETEFILE ΓòÉΓòÉΓòÉ
  1486.  
  1487.  
  1488. ΓòÉΓòÉΓòÉ 8.7.1. (Delete file from disk) ΓòÉΓòÉΓòÉ
  1489.  
  1490.  
  1491. Purpose Delete the file specified in mp1 from disk and free pointer 
  1492. Message Parameter 1  filename(PSZ) Fully qualified file name. 
  1493. Message Parameter 2  not used() 
  1494. Return   NULL 
  1495. Remarks 
  1496.  
  1497.  
  1498. ΓòÉΓòÉΓòÉ 8.8. EPM_EDIT_ACTIVATEFILEID ΓòÉΓòÉΓòÉ
  1499.  
  1500.  
  1501. ΓòÉΓòÉΓòÉ 8.8.1. (Activate a file) ΓòÉΓòÉΓòÉ
  1502.  
  1503.  
  1504. Purpose Activate a file corresponding to the specified file identifier. 
  1505. Message Parameter 1  fileid (LONG) A file identifier that could be obtained 
  1506. using the EtkQueryFileID function. 
  1507. Message Parameter 2  not used() 
  1508. Return   NULL 
  1509. Remarks 
  1510.  
  1511.  
  1512. ΓòÉΓòÉΓòÉ 8.9. EPM_EDIT_CHAR ΓòÉΓòÉΓòÉ
  1513.  
  1514.  
  1515. ΓòÉΓòÉΓòÉ 8.9.1. (Issue a WM_CHAR message) ΓòÉΓòÉΓòÉ
  1516.  
  1517.  
  1518. Purpose An alternitive to the WM_CHAR message.  It is handled exactly in the 
  1519. same manner as WM_CHAR. 
  1520. Message Parameter 1  mp1(MPARAM) See WM_CHAR in the PM Tech. Ref. 
  1521. Message Parameter 2  mp2(MPARAM) See WM_CHAR in the PM Tech. Ref. 
  1522. Return 
  1523. Remarks 
  1524.  
  1525.  
  1526. ΓòÉΓòÉΓòÉ 8.10. EPM_EDIT_CLIPBOARDCOPY ΓòÉΓòÉΓòÉ
  1527.  
  1528.  
  1529. ΓòÉΓòÉΓòÉ 8.10.1. (Insert text into the PM Clipboard) ΓòÉΓòÉΓòÉ
  1530.  
  1531.  
  1532. Purpose Fast path to inserting text into the PM Clipboard. 
  1533. Message Parameter 1  pTextBuf(PVOID) Pointer to a memory buffer containing text 
  1534. to copy to the clipboard. The text is in a format described by mp2. 
  1535. Message Parameter 2  mp2() Flag that describes what format of the memory 
  1536. buffer, which was passed in mp1. 
  1537.  
  1538.       0 = CF_TEXT type buffer, terminated by nul
  1539.       1 = EPM shared memory buffer (32byte head)
  1540.  
  1541. Return 
  1542. Remarks 
  1543.  
  1544. When the contents of mp1 is copied to the clipboard a EPM defc event is called 
  1545. by the name of PROCESSCLIPBOARDCOPY. Arg(1) of this function is the original 
  1546. buffer passed in as mp1. The caller may choose to free the buffer during this 
  1547. command. If zero is passed as arg(1), an error was encountered.  An error 
  1548. message should be displayed at this point. 
  1549.  
  1550.  
  1551. ΓòÉΓòÉΓòÉ 8.11. EPM_EDIT_COMMAND ΓòÉΓòÉΓòÉ
  1552.  
  1553.  
  1554. ΓòÉΓòÉΓòÉ 8.11.1. (Editor Command Message - E-MLE) ΓòÉΓòÉΓòÉ
  1555.  
  1556.  
  1557. Purpose Issue a command to the E-MLE 
  1558. Message Parameter 1  Edit command (PSZ) Any legal editor command. (See Appendix 
  1559. B for a complete list of commands) 
  1560. Message Parameter 2  command flags(USHORT) The following command flags can be 
  1561. set with the EPM_EDIT_COMMAND message: 
  1562.  
  1563.  o COMMAND_SYNC   - the command is sent to the edit interpreter thread and is 
  1564.    executed immediately or after the last command. 
  1565.  
  1566.  o COMMAND_FREESEL - free the selector of parameter one when done. 
  1567.  
  1568.  o COMMAND_GETABLE - the selector in parameter one is a getable shared segment. 
  1569.  
  1570.  Returns   void 
  1571.  Remarks This message is the main source of communication to editor windows. 
  1572.  To send a message to a specific file, send any legal editor command (in string 
  1573.  form) to the associated edit window handle.  Legal editor commands consist of 
  1574.  any of the base editor commands or any user defined commands.  User commands 
  1575.  can be created within the editor macro language via DEFC's.  For command 
  1576.  return codes see the EPM_EDIT_RETCODE message.  See Appendix B for a complete 
  1577.  list of commands  By default all commands sent or posted to edit windows are 
  1578.  copied and posted to the editor interpreter thread.  By setting the 
  1579.  COMMAND_SYNC flag the command is sent to the editor interpreter, therefore it 
  1580.  will be executed immediately or after the last command is finished executing. 
  1581.  When an application other then the one that created an edit window wishes to 
  1582.  send a command to an edit window, that application must allocate a shared 
  1583.  segment for the command string (parameter one). The COMMAND_GETABLE flag 
  1584.  notifies the E Toolkit that the pointer in parameter one is that of a getable 
  1585.  shared segment.  When an application wants the selector sent in parameter one 
  1586.  to be freed after it is used by the E Toolkit, the COMMAND_FREESEL flag must 
  1587.  be set. This flag is only valid for selectors allocated within the application 
  1588.  that created the edit window.  A selector of a getable shared segment can't be 
  1589.  freed by the E Toolkit with this message. 
  1590.  
  1591.  
  1592. ΓòÉΓòÉΓòÉ 8.12. EPM_EDIT_COMMAND2 ΓòÉΓòÉΓòÉ
  1593.  
  1594.  
  1595. ΓòÉΓòÉΓòÉ 8.12.1. (Execute Command) - Sent TO an E-MLE window ΓòÉΓòÉΓòÉ
  1596.  
  1597.  
  1598. Purpose Same as EPM_EDIT_COMMAND, but if the command does not exist, no error 
  1599. message is generated. 
  1600. Message Parameter 1  See EPM_EDIT_COMMAND 
  1601. Message Parameter 2  See EPM_EDIT_COMMAND 
  1602. Return  See EPM_EDIT_COMMAND 
  1603. Remarks 
  1604.  
  1605.  
  1606. ΓòÉΓòÉΓòÉ 8.13. EPM_EDIT_CHANGEFONT ΓòÉΓòÉΓòÉ
  1607.  
  1608.  
  1609. ΓòÉΓòÉΓòÉ 8.13.1. (Change E-MLE's Font) ΓòÉΓòÉΓòÉ
  1610.  
  1611.  
  1612. Purpose Change E-MLE's base font. 
  1613. Message Parameter 1  name(PSZ)  Font Face Name. 
  1614. Message Parameter 2  size(USHORT)  Point Size.  style(USHORT)  Attribute Style. 
  1615. Remarks 
  1616.  
  1617.  
  1618. ΓòÉΓòÉΓòÉ 8.14. EPM_EDIT_TASKLIST ΓòÉΓòÉΓòÉ
  1619.  
  1620.  
  1621. ΓòÉΓòÉΓòÉ 8.14.1. (Show/Hide Task list enty) ΓòÉΓòÉΓòÉ
  1622.  
  1623.  
  1624. Purpose This message can either show or hide a task list entry corresponding to 
  1625. an E-MLE window.  It also allows an application to set a prefix string before 
  1626. the task list entry, which typically contains the name of the visible file. 
  1627. Message Parameter 1  flag(LOUSHORT)  Show task list entry flag  TRUE=Show entry 
  1628. FALSE = Hide entry 
  1629. Message Parameter 2  Prefix_string(PSZ)  String to be pre-pended to the task 
  1630. list entry 
  1631. Remarks This message can be either sent of posted, however, if this message is 
  1632. posted, the application is responsible for freeing the string. 
  1633.  
  1634.  
  1635. ΓòÉΓòÉΓòÉ 8.15. EPM_EDIT_RETCODE ΓòÉΓòÉΓòÉ
  1636.  
  1637.  
  1638. ΓòÉΓòÉΓòÉ 8.15.1. (Editor Command Message Return Code) ΓòÉΓòÉΓòÉ
  1639.  
  1640.  
  1641. Purpose Send to the registered owner in response to a edit command. 
  1642. Message Parameter 1  Return string (PSZ)  Text describing the return code. 
  1643. Message Parameter 2  return code (USHORT)  specific editor return code. 
  1644. Remarks  Sent to owner registered in the Editor Information structure. (See 
  1645. Appendix A for more details on the Edit Information structure.) This message is 
  1646. in response to a internal editor return code/ error code.  See Appendix C for 
  1647. editor return codes. 
  1648.  
  1649.  
  1650. ΓòÉΓòÉΓòÉ 8.16. EPM_EDIT_CURSORMOVE ΓòÉΓòÉΓòÉ
  1651.  
  1652.  
  1653. ΓòÉΓòÉΓòÉ 8.16.1. (Editor Cursor Moved) ΓòÉΓòÉΓòÉ
  1654.  
  1655.  
  1656. Purpose The cursor has changed position in the edit window. 
  1657. Message Parameter 1  row (ULONG)  row of cursor in file 
  1658. Message Parameter 2  column (ULONG)  column of cursor in file 
  1659. Remarks  Sent to owner registered in the Editor Information structure.  (See 
  1660. Appendix A for more details on the Edit Information structure.)  This message 
  1661. gives the owner the capability to track the editor's cursor. 
  1662.  
  1663.  
  1664. ΓòÉΓòÉΓòÉ 8.17. EPM_EDIT_ACTIVEHWND ΓòÉΓòÉΓòÉ
  1665.  
  1666.  
  1667. ΓòÉΓòÉΓòÉ 8.17.1. (Editor received focus) ΓòÉΓòÉΓòÉ
  1668.  
  1669.  
  1670. Purpose Notify application that a specific edit window has become active. 
  1671. Message Parameter 1  Edit Window Handle (HWND)  Handle of active edit window. 
  1672. Message Parameter 2  active file name (PSZ)  Full path of top most file being 
  1673. edited in active edit window. 
  1674. Remarks  Processing this message is useful if more than one edit window is 
  1675. being used by a given application.  The application does not need to keep 
  1676. global information on each edit window because it is returned via this message. 
  1677.  
  1678.  
  1679. ΓòÉΓòÉΓòÉ 8.18. EPM_EDIT_OPTIONS ΓòÉΓòÉΓòÉ
  1680.  
  1681.  
  1682. ΓòÉΓòÉΓòÉ 8.18.1. (Get Editor Option Information) - Sent TO E-MLE ΓòÉΓòÉΓòÉ
  1683.  
  1684.  
  1685. Purpose Get a specified piece of editor information. 
  1686. Message Parameter 1  Option Number (LONG)  OPTIONS_xxxxx constant.  (See 
  1687. Remarks.) 
  1688. Message Parameter 2  [Buffer](PVOID)  Used by some options. 
  1689. Return The returned value depends on the option selected.  Constant that 
  1690. specifies one of the following options: 
  1691.  
  1692.  OPTIONS_MARGINS Returns 4 bytes containing (lo to hi): left marg (CHAR), right 
  1693.            marg (CHAR), paragraph margin (CHAR), 0 (CHAR). 
  1694.  OPTIONS_LINE Returns line of file that contains the cursor. (ULONG) 
  1695.  OPTIONS_COLUMN Returns column of file that contains the cursor. (ULONG) 
  1696.  OPTIONS_INSERT Returns TRUE if cursor is in insert mode. (ULONG) 
  1697.  OPTIONS_AUTOSAVE Returns the number of changes before autosave. (ULONG) 
  1698.  OPTIONS_NTABS Returns the number of tab stops. (ULONG) 
  1699.  OPTIONS_NROWS Returns the total number of rows visible in the E-MLE. (uses the 
  1700.            default font height as a measument.) 
  1701.  OPTIONS_NCOLS Returns the total number of columns visible in the E-MLE. (uses 
  1702.            the default font width as a measument.) (ULONG) 
  1703.  OPTIONS_MODIFY Returns TRUE if the file has been modified. (last save) (ULONG) 
  1704.  OPTIONS_TAB Returns a pointer to a byte-table of tab values. The table is 
  1705.            terminated by a NULL character. (PBYTE) 
  1706.  OPTIONS_SEARCH Returns the last string searched by locate or change. (PSZ) 
  1707.  OPTIONS_GETTEXT Returns the line of text specified by high word of option 
  1708.            parameter. If high word is NULL the the line in which the cursor is 
  1709.            currently on is returned.  Parameter 2 must contain a pointer to a 
  1710.            255 byte character array.  The specified line will be placed into 
  1711.            this buffer.  (PSZ) 
  1712.  OPTIONS_NAME Returns the name of the visible file. 
  1713.  OPTIONS_HWNDEXTRA Returns the handle to the extra area window. (HWND) 
  1714.  OPTIONS_HWNDEIOBJECT Returns the handle to the EI Work Thread. (PVOID) 
  1715.  OPTIONS_TEXTCOLOR Returns the text Foreground (LOUSHORT) and Background 
  1716.            (HIUSHORT). 
  1717.  OPTIONS_RING Returns a buffer filled with the name of the files within the 
  1718.            E-MLE ring.  The buffer has the following format: 
  1719.  
  1720.                           USHORT - length of filenames
  1721.                           UCHAR  - delimitor
  1722.                           ULONG  - fileid
  1723.                           CHAR[] - delimited string
  1724.  
  1725.  OPTIONS_FILEID Returns the File ID of the visible file. 
  1726.  OPTIONS_QSELECTION Returns the type of selection. 
  1727.   This message is send to a edit window to get a specified option.  All options 
  1728.  are returned in the form of a 4 byte return code.  Here is an example of using 
  1729.  the Option message to get the total numbers of visible lines in a edit window. 
  1730.  
  1731.      VisibleLines = (ULONG)WinSendMsg( hwndEditWindow,
  1732.                                        EPM_EDIT_OPTIONS,
  1733.                                        OPTIONS_NROWS,
  1734.                                        0L
  1735.                                      );
  1736.  
  1737.  
  1738. ΓòÉΓòÉΓòÉ 8.19. EPM_EDIT_ID ΓòÉΓòÉΓòÉ
  1739.  
  1740.  
  1741. ΓòÉΓòÉΓòÉ 8.19.1. Query Editor ID number ΓòÉΓòÉΓòÉ
  1742.  
  1743.  
  1744. Purpose Determine if a window handle is your E-MLE window. 
  1745. Message Parameter 1  NULL  not used 
  1746. Message Parameter 2  NULL  not used 
  1747. Remarks  This message is used to determine if a window handle is a edit window 
  1748. handle.  This message returns a 4byte return code.  The way to determine if the 
  1749. specified handle is a edit window is by checking if the Hi-order word contains 
  1750. the value of EPM_EDIT_ID and the Lo-order word contains the value specified in 
  1751. the create structure field, 'editid'.  If a match is found in the Hi-order word 
  1752. then the window handle is a edit window. If a match is found in both the 
  1753. Hi-order word and the Lo-order word, then the window handle is a edit window 
  1754. created by your application.  An example follows: 
  1755.  
  1756.       result = WinSendMsg( hwndE, EPM_EDIT_ID, 0L, 0L );
  1757.       match  = MPFROM2SHORT(epm.editid,EPM_EDIT_ID);
  1758.  
  1759.       if (result==match) {
  1760.           /* Edit window found */
  1761.       }
  1762.  
  1763.  
  1764. ΓòÉΓòÉΓòÉ 8.20. EPM_EDIT_SHOW ΓòÉΓòÉΓòÉ
  1765.  
  1766.  
  1767. ΓòÉΓòÉΓòÉ 8.20.1. (Make edit window visible/invisible) ΓòÉΓòÉΓòÉ
  1768.  
  1769.  
  1770. Purpose Refresh and Show/Hide the edit window specified. 
  1771. Message Parameter 1  Show Flag(Bool)  TRUE  = Show and Refresh edit window 
  1772. FALSE = Hide edit window 
  1773. Message Parameter 2  NULL  not used 
  1774. Remarks  When an edit window is created (using EtkCreate) the WS_VISIBLE flag 
  1775. is not used as a window style.  Therefore, the edit window is not visible upon 
  1776. creation.  It is recommended that an EPM_EDIT_SHOW message be sent to the edit 
  1777. window to be displayed instead of WinShowWindow(...).  The difference between 
  1778. sending the EPM_EDIT_SHOW verses the WinShowWindow is that the EPM_EDIT_SHOW 
  1779. forces a window repaint. 
  1780.  
  1781.  
  1782. ΓòÉΓòÉΓòÉ 8.21. EPM_EDIT_NEWFILE ΓòÉΓòÉΓòÉ
  1783.  
  1784.  
  1785. ΓòÉΓòÉΓòÉ 8.21.1. (Open a new edit window) ΓòÉΓòÉΓòÉ
  1786.  
  1787.  
  1788. Purpose Open a new edit window with the specified file. 
  1789. Message Parameter 1  file name(PSZ)  Asciiz string pointer to any legal file 
  1790. name.  (Wildcards are supported) 
  1791. Message Parameter 2  string flags (MPARAM)  Flags specifying how to handle the 
  1792. pointer in parameter one.  The following are flags that can be set. 
  1793.  
  1794.  o COMMAND_GETABLE - The pointer is a getable shared segment. Use 
  1795.    DosGetSeg(SELECTOROF(mp1) ) to access the pointer. 
  1796.  
  1797.  o COMMAND_FREESEL - The selector must be freed after it is used by the 
  1798.    application. Use DosFreeSeg( FP_SEG(mp1) ) to            free the selector. 
  1799.  
  1800.  Returns   void 
  1801.  Remarks  An edit window is requesting that another edit window be opened. 
  1802.  This message should be handled by calling EtkCreate. 
  1803.  
  1804.  The macros used by the EPM editor use this message to implement the 'OPEN' 
  1805.  command. 
  1806.  
  1807.  The Flags in parameter two are checked by anding parameter two with the 
  1808.  constants COMMAND_GETABLE and COMMAND_FREESEL.  For example to check if the 
  1809.  COMMAND_GETABLE flag is set do the folowing: 
  1810.  
  1811.     if( LONGFROMMP(mp2) & COMMAND_FREESEL ) {
  1812.       /* the free selector flag is set */
  1813.       }
  1814.  
  1815.  
  1816. ΓòÉΓòÉΓòÉ 8.22. EPM_EDIT_DESTROYNOTIFY ΓòÉΓòÉΓòÉ
  1817.  
  1818.  
  1819. ΓòÉΓòÉΓòÉ 8.22.1. (A E-MLE has been closed) ΓòÉΓòÉΓòÉ
  1820.  
  1821.  
  1822. Purpose Notify owner that an E-MLE window has been closed. 
  1823. Message Parameter 1  edit handle(HWND)  Handle to the client window of the 
  1824. E-MLE window that was just closed. 
  1825. Message Parameter 2  message queue(HMQ) Handle to the message queue formally 
  1826. being used by the E-MLE window that was just closed. 
  1827. Returns   void 
  1828. Remarks  Sent to owner registered in the Editor Information structure.  (See 
  1829. Appendix A for more details on the Edit Information structure.)  This message 
  1830. gives the owner the ability to take some action when a edit window is closed. 
  1831. Note that the window handle passed is not valid.  It is to be used for 
  1832. reference only. 
  1833.  
  1834.  
  1835. ΓòÉΓòÉΓòÉ 8.23. EPM_EXTRAWINDOW_REFRESH ΓòÉΓòÉΓòÉ
  1836.  
  1837.  
  1838. ΓòÉΓòÉΓòÉ 8.23.1. (Refresh Extra Window Control) ΓòÉΓòÉΓòÉ
  1839.  
  1840.  
  1841. Purpose Repaint the optional editor extra window, updating all values. 
  1842. Message Parameter 1  NULL(MPARAM)  not used 
  1843. Message Parameter 2  NULL (MPARAM)  not used 
  1844. Returns   VOID 
  1845. Remarks  The Extra Window control can provide two extra lines of text,  the 
  1846. status area and the message area. 
  1847.  
  1848. To obtain the extra window handle, send a EPM_EDIT_OPTION message to the edit 
  1849. window in question.  When sending the option message specify OPTION_HWNDEXTRA 
  1850. as message parameter one. 
  1851.  
  1852.  
  1853. ΓòÉΓòÉΓòÉ 8.24. EPM_EDIT_CONTROLTOGGLE ΓòÉΓòÉΓòÉ
  1854.  
  1855.  
  1856. ΓòÉΓòÉΓòÉ 8.24.1. (Toggle or Query the status of a base edit window control) ΓòÉΓòÉΓòÉ
  1857.  
  1858.  
  1859. Purpose Toggle a editor control on/off or force the control on/off. 
  1860. Message Parameter 1  Id(LOUSHORT)  Control identifier; See table below.  rce 
  1861. ON/OFF(HIUSHORT)  Set to 2=ON, or 1=OFF 
  1862. Message Parameter 2  Query flag (MPARAM)  TRUE if control is to be Queried, 
  1863. otherwise FALSE. 
  1864. Returns   void 
  1865. Remarks  This message is send to an edit window to toggle (turn ON or OFF) some 
  1866. editor control window.  The message can also be used to force a particular 
  1867. control on or off. 
  1868.  
  1869. The lo-ordered short of the first message parameter contains an id number that 
  1870. determines the control window.  The id constants are as follows: 
  1871.  
  1872.  EDITSTATUSAREA Status area of extra window control. 
  1873.  EDITMSGAREA Message area of extra window control 
  1874.  EDITVSCROLL Vertical scroll bar 
  1875.  EDITHSCROLL Horizontal scroll bar 
  1876.  EDITTITLEBAR Stops automatic updating of title bar with filename.  This is 
  1877.            useful if the application requires the title bar to display text 
  1878.            other then the current file being edited. 
  1879.  EDITCURSOR Editor cursor 
  1880.   The hi-ordered short of the first message parameter contains an optional 
  1881.  value.  If the value is null then the control is toggled.  If it is non- zero 
  1882.  the control status is set to one less the value.  This value should be set to 
  1883.  2 if you want to force the control on, or one if you want to force the control 
  1884.  off.  Parameter contain the Query Flag.  If parameter is non-zero the status 
  1885.  of the specified control is returned.  That is, TRUE is returned if the 
  1886.  control is active or FALSE if it is not. 
  1887.  
  1888.  
  1889. ΓòÉΓòÉΓòÉ 8.25. EPM_EDIT_RECORDKEY- ΓòÉΓòÉΓòÉ
  1890.  
  1891.  
  1892. ΓòÉΓòÉΓòÉ 8.25.1. (Start recording keystrokes) ΓòÉΓòÉΓòÉ
  1893.  
  1894.  
  1895. Purpose Start the recording of keystrokes (WM_CHAR messages) sent to the edit 
  1896. window. 
  1897. Message Parameter 1  NULL (MPARAM)  not used 
  1898. Message Parameter 2  NULL (MPARAM)  not used 
  1899. Returns   void 
  1900. Remarks 
  1901.  
  1902.  
  1903. ΓòÉΓòÉΓòÉ 8.26. EPM_EDIT_ENDRECORDKEY- ΓòÉΓòÉΓòÉ
  1904.  
  1905.  
  1906. ΓòÉΓòÉΓòÉ 8.26.1. (Stop storing keystrokes) ΓòÉΓòÉΓòÉ
  1907.  
  1908.  
  1909. Purpose Terminates the storing of keystrokes (WM_CHAR messages) started by the 
  1910. EPM_EDIT_RECORDKEY message. 
  1911. Message Parameter 1  NULL (MPARAM)  not used 
  1912. Message Parameter 2  NULL (MPARAM)  not used 
  1913. Returns   void 
  1914. Remarks 
  1915.  
  1916.  
  1917. ΓòÉΓòÉΓòÉ 8.27. EPM_EDIT_PLAYKEY ΓòÉΓòÉΓòÉ
  1918.  
  1919.  
  1920. ΓòÉΓòÉΓòÉ 8.27.1. (Execute stored keystrokes) - Sent TO an E-MLE ΓòÉΓòÉΓòÉ
  1921.  
  1922.  
  1923. Purpose Generate keystrokes (WM_CHAR messages) saved since the 
  1924. EPM_EDIT_RECORDKEY message has been sent. 
  1925. Message Parameter 1  NULL (MPARAM)  not used 
  1926. Message Parameter 2  NULL (MPARAM)  not used 
  1927. Returns   void 
  1928. Remarks  It is recommend that a EPM_EDIT_ENDRECORDKEY message be sent before 
  1929. this message is sent.  If the edit window is still in record mode when the 
  1930. message is sent an error message is sent to the owner window. 
  1931.  
  1932.  
  1933. ΓòÉΓòÉΓòÉ 8.28. EPM_EDIT_QUERYRECORDKEY ΓòÉΓòÉΓòÉ
  1934.  
  1935.  
  1936. ΓòÉΓòÉΓòÉ 8.28.1. (Determine record key state) ΓòÉΓòÉΓòÉ
  1937.  
  1938.  
  1939. Purpose Returns TRUE if edit window is recording keys. 
  1940. Message Parameter 1  NULL (MPARAM)  not used 
  1941. Message Parameter 2  NULL (MPARAM)  not used 
  1942. Returns   TRUE = edit window is recording keys. 
  1943. Remarks 
  1944.  
  1945.  
  1946. ΓòÉΓòÉΓòÉ 8.29. EPM_EDIT_ASKTOQUIT ΓòÉΓòÉΓòÉ
  1947.  
  1948.  
  1949. ΓòÉΓòÉΓòÉ 8.29.1. (Request to quit a modified file) ΓòÉΓòÉΓòÉ
  1950.  
  1951.  
  1952. Purpose Notify application that a request has been sent to quit a file which 
  1953. has been modified. 
  1954. Message Parameter 1  filename (PSZ)  Name of file that has been modified. 
  1955. Message Parameter 2  heditwnd (HWND)  The edit window's handle. 
  1956. Remarks  This message is sent after the E toolkit has received notice to quit a 
  1957. modified file. The application must respond to this message by sending an 
  1958. EPM_EDIT_ASKTODONE message. When an application receives this message it is a 
  1959. good time to pop a dialog to the user asking what action to take. (See the 
  1960. Quitbox dialog for an example ) 
  1961. Related Messages 
  1962.  
  1963.  EPM_EDIT_ASKTOCLOSE
  1964.  EPM_EDIT_ASKTOFAILED
  1965.  EPM_EDIT_ASKTODONE
  1966.  
  1967.  
  1968. ΓòÉΓòÉΓòÉ 8.30. EPM_EDIT_ASKTOCLOSE ΓòÉΓòÉΓòÉ
  1969.  
  1970.  
  1971. ΓòÉΓòÉΓòÉ 8.30.1. (Request to close an edit window) ΓòÉΓòÉΓòÉ
  1972.  
  1973.  
  1974. Purpose Notify application that a request has be sent to close an edit window 
  1975. which contains a file that has been modified. 
  1976. Message Parameter 1  filename (PSZ)  Name of file that has been modified. 
  1977. Message Parameter 2  heditwnd (HWND)  The edit window's handle. 
  1978. Remarks  This message is sent after the E toolkit has received notice to close 
  1979. an edit window which contains a modified file. The application must respond to 
  1980. this message by sending an EPM_EDIT_ASKKTODONE message. 
  1981. Related Messages 
  1982.  
  1983.  EPM_EDIT_ASKTOQUIT
  1984.  EPM_EDIT_ASKTOFAILED
  1985.  EPM_EDIT_ASKTODONE
  1986.  
  1987.  
  1988. ΓòÉΓòÉΓòÉ 8.31. EPM_EDIT_ASKTODONE ΓòÉΓòÉΓòÉ
  1989.  
  1990.  
  1991. ΓòÉΓòÉΓòÉ 8.31.1. (Respond to EPM_EDIT_ASKTOxxx message) ΓòÉΓòÉΓòÉ
  1992.  
  1993.  
  1994. Purpose Respond to one of the EPM_EDIT_ASKTOxxx messages from the E toolkit. 
  1995. Message Parameter 1  retcode (MPFROMSHORT)  Response message sent to E toolkit. 
  1996. One of the following messages can be used: 
  1997.  
  1998.  o ERES_CANCEL  - Cancel the closing of the file or edit window. 
  1999.  
  2000.  o ERES_DISCARD - Discard the modifications and continue closing. 
  2001.  
  2002.  o ERES_SAVE   - Save file as message parameter two and continue closing. 
  2003.  
  2004.  Message Parameter 2  filename (PSZ) Name of file to save modifications in if 
  2005.  EPM_SAVE is sent. This pointer must be the same pointer sent to the 
  2006.  applications with one of the EPM_EDIT_ASKTOxxx messages. 
  2007.  Remarks  This message allows the application control the saving or discarding 
  2008.  of a modified file when an edit window is closing, a quit file message has 
  2009.  been sent, or when a previous EPM_EDIT_ASKTODONE message returned 
  2010.  EPM_EDIT_ASKTOFAILED. 
  2011.  Related Messages 
  2012.  
  2013.    EPM_EDIT_ASKTQUIT
  2014.    EPM_EDIT_ASKTOCLOSE
  2015.    EPM_EDIT_ASKTODONE
  2016.  
  2017.  
  2018. ΓòÉΓòÉΓòÉ 8.32. EPM_EDIT_ASKTOFAILED ΓòÉΓòÉΓòÉ
  2019.  
  2020.  
  2021. ΓòÉΓòÉΓòÉ 8.32.1. (Last EPM_EDIT_ASKTODONE failed) ΓòÉΓòÉΓòÉ
  2022.  
  2023.  
  2024. Purpose Notify application that the file name sent with the last 
  2025. EPM_EDIT_ASKTODONE message could not be saved with the name specified. 
  2026. Message Parameter 1  filename (filename)  File name used which caused an error 
  2027. in saving. 
  2028. Message Parameter 2  heditwnd (HWND)  The edit window's handle. 
  2029. Remarks  This message informs the application that the file name sent with the 
  2030. EPM_EDIT_ASKTODONE message and message parameter EPM_SAVE, was a bad file name. 
  2031. The application should correct the file name and send another 
  2032. EPM_EDIT_ASKTODONE message. 
  2033. Related Messages 
  2034.  
  2035.  EPM_EDIT_ASKTQUIT
  2036.  EPM_EDIT_ASKTOCLOSE
  2037.  EPM_EDIT_ASKTOFAILED
  2038.  
  2039.  
  2040. ΓòÉΓòÉΓòÉ 9. ERES.DLL ΓòÉΓòÉΓòÉ
  2041.  
  2042.  ERES.DLL exports a set a general purpose functions that can be used by an 
  2043. application that contains E-MLE's. These functions are detailed in this 
  2044. section. In order to use these functions an application  must do the following 
  2045. in the order given: 
  2046.  
  2047.   1. Include ETOOLKT.H in all source files that use ERES.DLL functions. The 
  2048.      main source file of the application should define the constant 
  2049.      INCL_DONT_EXT_GLOB before including etoolkt.h.  For example: 
  2050.  
  2051.                 #define INCL_DONT_EXT_GLOB
  2052.                 #include <ETOOLKT.H>
  2053.  
  2054.   2. Declare a variable of type GLOBDATA in the main source file of the 
  2055.      application. 
  2056.  
  2057.   3. Load the ERES.DLL module and initialize the "eresModule" field of the 
  2058.      GLOBDATA variable with the ERES.DLL module handle. 
  2059.  
  2060.                  // Note that GlobData is a variable of type GLOBDATA
  2061.                  DosLoadModule((PSZ)NULL,(USHORT)0,(PSZ)"ERES",(PHMODULE)&GlobData.eresModule );
  2062.  
  2063.   4. The following three function calls must be called next. 
  2064.  
  2065.                   ERESRegisterEtkFunctions((PFN) EtkCreate,  CREATE_FUNC);
  2066.                   ERESRegisterEtkFunctions((PFN) EtkDestroy, DESTROY_FUNC);
  2067.                   ERESRegisterEtkFunctions((PFN) EtkVersion,       VERSION_FUNC);
  2068.      (See ERESRegisterEtkFunctions in the section "ERES.DLL Exported Functions" 
  2069.      for an explanation of these function calls) 
  2070.  
  2071.   5. Call the function ERESInitEresGlob()  in order to initialize the internal 
  2072.      data of ERES.DLL. 
  2073.  
  2074.   6. Required fields of the variable of type GLOBDATA must be initialized. 
  2075.      These are: 
  2076.  
  2077.     o eres.exfilename - name of the applications EX file. 
  2078.     o ApplicationName - name of the application. 
  2079.     o ExSearchPath   - search path for EX files. Set to NULL if search 
  2080.       path includes only the current directory. 
  2081.     o ApplicationID  - a unique ID that distinguishes the edit windows 
  2082.       of the application. 
  2083.  
  2084.  
  2085. ΓòÉΓòÉΓòÉ 9.1. ERES.DLL - Exported Functions ΓòÉΓòÉΓòÉ
  2086.  
  2087.  The following functions are exported from ERES.DLL 
  2088.  
  2089.  .--------------------------------------------------------------------------.
  2090.  |   Dynalink functions found in ERES.DLL                                   |
  2091.  |--------------------------------------------------------------------------|
  2092.  |                                                                          |
  2093.  |   ERESRegisterEtkFunctions  - Register pointer to E.DLL functions        |
  2094.  |   ERESCommonWndProc         - Common window procedure                    |
  2095.  |   EresSaveLists             - Saves internal list data to ini file       |
  2096.  |   ERESRetrieveLists         - Retrieves internal list data from ini file |
  2097.  |   ERESOpenEditWindow        - Opens a new edit window                    |
  2098.  |   ERESCountEWindows         - Counts the number of edit windows          |
  2099.  |   ERESPopDlgBox             - Pop Dialog box                             |
  2100.  |   ERESIsAnEditWin           - Is an edit window                          |
  2101.  |   ERESEwindowValid          - Edit window valid                          |
  2102.  |   ERESSendOpenMsgToApp      - Send open message to application           |
  2103.  |   ERESShutDown              - Shut down all edit windows                 |
  2104.  |   ERESInitEResStruct        - Initialize the ERES structure              |
  2105.  |   ERESCheckVersion          - Check the E.DLL version                    |
  2106.  |   ERESProcessCommands       - Process command messages.                  |
  2107.  |   ERESEditWindowlist        - Show listing of available edit windows.    |
  2108.  |                                                                          |
  2109.  .--------------------------------------------------------------------------.
  2110.  
  2111.  
  2112. ΓòÉΓòÉΓòÉ 9.2. ERESRegisterEtkFunctions ΓòÉΓòÉΓòÉ
  2113.  
  2114.  
  2115.  ERESRegisterEtkFunctions - 
  2116.   (Registers pointers to E.DLL functions) 
  2117.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  2118.  
  2119.      Allows ERES.DLL to call E.DLL functions without having to import them. 
  2120.  
  2121.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2122.           Γöé ERESRegisterEtkFunctions (  ,  )
  2123.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2124.  
  2125.  Parameters 
  2126.  
  2127.      FuncPtr  (PFN) - input 
  2128.         Pointer to E.DLL function. One of the following can be used: 
  2129.  
  2130.  o EtkCreate 
  2131.  o EtkDestroy 
  2132.  o EtkVersion 
  2133.  
  2134.      ID  (USHORT) - input 
  2135.         Function identifier. One of the following can be used: 
  2136.  
  2137.  o CREATE_FUNC  - EditWindowCreate 
  2138.  o DESTROY_FUNC - EditWindowDestroy 
  2139.  o VERSION_FUNC - EditVersion 
  2140.  
  2141.  Returns  Void 
  2142.  
  2143.  Remarks 
  2144.  
  2145.      Currently an application must send the pointers of E.DLL functions 
  2146.      required by ERES.DLL in order to avoid reloading of the E.DLL module. Due 
  2147.      to an a debug in the operating system if two modules in the same 
  2148.      application import the same module, that module is reloaded. Therefore, 
  2149.      this function avoids the costly reloading of the E.DLL module. Util this 
  2150.      problem is resolved the following code must be placed after an application 
  2151.      loades eres.dll: 
  2152.  
  2153.  Example 
  2154.  
  2155.              ERESRegisterEtkFunctions((PFN) EtkCreate,  CREATE_FUNC);
  2156.              ERESRegisterEtkFunctions((PFN) EtkDestroy, DESTROY_FUNC);
  2157.              ERESRegisterEtkFunctions((PFN) EtkVersion, VERSION_FUNC);
  2158.  
  2159.  
  2160. ΓòÉΓòÉΓòÉ 9.3. ERESCommonWndProc ΓòÉΓòÉΓòÉ
  2161.  
  2162.  
  2163. ΓòÉΓòÉΓòÉ 9.3.1. (Common window procedure) ΓòÉΓòÉΓòÉ
  2164.  
  2165.  
  2166. Purpose Handles default window message processing of E toolkit applications. 
  2167. Prototype 
  2168.  
  2169. ERESCommonWndProc 
  2170. Parameters  hwnd (HWND)  The window handle of the application.  msg (HWND)  The 
  2171. window message.  mp1 (MPARAM)  Message parameter one.  mp2 (MPARAM)  Message 
  2172. parameter two. 
  2173. Returns  VOID 
  2174. Remarks  Applications that choose to call this function as their default window 
  2175. procedure will have the default message processing for E toolkit messages. (See 
  2176. Appendix H for a description of these messages) The Window ULONG of the 
  2177. applications window handle must be set to the address of the GLOBDATA structure 
  2178. in order to process application specific information. 
  2179.  
  2180.  
  2181. ΓòÉΓòÉΓòÉ 9.4. ERESSaveLists ΓòÉΓòÉΓòÉ
  2182.  
  2183.  
  2184. ΓòÉΓòÉΓòÉ 9.4.1. (Saves internal list data to ini file) ΓòÉΓòÉΓòÉ
  2185.  
  2186.  
  2187. Purpose Saves the internal data structures of the Open File, List Box, and 
  2188. Command Dialog boxes in the ini file specified in the GLOBDATA structure. 
  2189. Prototype 
  2190.  
  2191. ERESSaveLists 
  2192. Parameters  GlobData (GLOBDATA *)  Pointer to application instance data. 
  2193. Returns  Void 
  2194. Remarks  GlobData->IniApplicationName contains the name of the ini file to 
  2195. store the structures in. GlobData->eres contains the structures cmd, msg, and 
  2196. open1 which are the structures used by the three dialog boxes. 
  2197.  
  2198.  
  2199. ΓòÉΓòÉΓòÉ 9.5. ERESRetrieveLists ΓòÉΓòÉΓòÉ
  2200.  
  2201.  
  2202. ΓòÉΓòÉΓòÉ 9.5.1. (Retrieves internal list data from ini file) ΓòÉΓòÉΓòÉ
  2203.  
  2204.  Purpose Retrieves the internal data structures of the Open File, List Box, and 
  2205. Command Dialog boxes from the ini file specified in the GLOBDATA structure. 
  2206. Prototype 
  2207.  
  2208. ERESRetrieveLists 
  2209. Parameters  GlobData (GLOBDATA *)  Pointer to application instance data. 
  2210. Returns  VOID 
  2211. Remarks  GlobData->IniApplicationName contains the name of the ini file to 
  2212. retrieve the structures from. GlobData->eres contains the structures cmd, msg, 
  2213. and open1 which are the structures used by the three dialog boxes. These will 
  2214. be filled with the data in the specified ini file. 
  2215.  
  2216.  
  2217. ΓòÉΓòÉΓòÉ 9.6. ERESOpenEditWindow ΓòÉΓòÉΓòÉ
  2218.  
  2219.  
  2220. ΓòÉΓòÉΓòÉ 9.6.1. (Opens a new edit window) ΓòÉΓòÉΓòÉ
  2221.  
  2222.  
  2223. Purpose Initializes the EDITORINFO structure with application specific data and 
  2224. calls the EPM_CreateEditWindow function of E.DLL . 
  2225. Prototype 
  2226.  
  2227. ERESOpenEditWindow 
  2228. Parameters  filename (char far *)  Pointer to the string containing the file to 
  2229. edit.  GlobData (GLOBDATA *)  Application instance data. 
  2230. Returns hwndEdit (HWND) The window handle of the new edit window. 
  2231. Remarks 
  2232.  
  2233.  
  2234. ΓòÉΓòÉΓòÉ 9.7. ERESCountEWindows ΓòÉΓòÉΓòÉ
  2235.  
  2236.  
  2237. ΓòÉΓòÉΓòÉ 9.7.1. (Counts the number of E-Multi-line Edit windows) ΓòÉΓòÉΓòÉ
  2238.  
  2239.  
  2240. Purpose Determines the number of available edit windows. 
  2241. Prototype 
  2242.  
  2243. ERESCountEWindows 
  2244. Parameters  GlobData (GLOBDATA *) Pointer to application instance data. 
  2245. Returns count (USHORT) The total number of E-Multi-line edit windows that 
  2246. belong to an application. 
  2247. Remarks  GlobData->CountOnlyVisibleWindows determines whether to count only 
  2248. visible windows. Some applications might create edit windows, keep them hidden, 
  2249. and use them at some later time. 
  2250.  
  2251.  
  2252. ΓòÉΓòÉΓòÉ 9.8. ERESPopDlgBox ΓòÉΓòÉΓòÉ
  2253.  
  2254.  
  2255. ΓòÉΓòÉΓòÉ 9.8.1. (Pop Dialog Box) ΓòÉΓòÉΓòÉ
  2256.  
  2257.  
  2258. Purpose Display the specified dialog box. If the dialog is already being 
  2259. displayed bring it to the top. 
  2260. Prototype 
  2261.  
  2262. ERESPopDlgBox( 
  2263. Parameters  proc (PFNWP) Pointer to the window procedure of the dialog.  dlgin 
  2264. (USHORT) Pointer to dialog input information.  ModuleType (PSZ) Specifies the 
  2265. module that contains the dialogs resource information excluding the ".DLL" 
  2266. extension. If set to NULL then the dialog resource is contained in ERES.DLL. 
  2267. ownertype (USHORT) The owner of the dialog. This can be set to one of four 
  2268. values: 
  2269.  
  2270.  o OT_DEFAULT   - Checks the value of the active edit window. If it is valid 
  2271.    make it the owner, else make the handle to the applications            frame 
  2272.    the owner. 
  2273.  
  2274.  o OT_ACTIVE_EDIT - Make the active edit window the owner. 
  2275.  
  2276.  o OT_APP_FRAME  - Make the applications frame the owner. 
  2277.  
  2278.  o OT_DESKTOP   - Make the desktop window the owner. 
  2279.   GlobData (GLOBDATA *) Application instance data. 
  2280.  Returns  VOID 
  2281.  Remarks 
  2282.  
  2283.  
  2284. ΓòÉΓòÉΓòÉ 9.9. ERESIsAnEditWin ΓòÉΓòÉΓòÉ
  2285.  
  2286.  
  2287. ΓòÉΓòÉΓòÉ 9.9.1. (Is an edit Window) ΓòÉΓòÉΓòÉ
  2288.  
  2289.  
  2290. Purpose Test if a given window is an edit window. 
  2291. Prototype 
  2292.  
  2293. ERESIsAnEditWin 
  2294. Parameters  hwnd  (HWND) Window handle of the window to test.  GlobData 
  2295. (GLOBDATA *) Pointer to application instance data. 
  2296. Returns rc(BOOL) 
  2297.  
  2298.  o TRUE  - The window is an edit window. 
  2299.  o FLASE - The window is not an edit window. 
  2300.  
  2301.  Remarks 
  2302.  
  2303.  
  2304. ΓòÉΓòÉΓòÉ 9.10. ERESEwindowValid ΓòÉΓòÉΓòÉ
  2305.  
  2306.  
  2307. ΓòÉΓòÉΓòÉ 9.10.1. (Is an Edit Window valid) ΓòÉΓòÉΓòÉ
  2308.  
  2309.  
  2310. Purpose Tests whether the active edit window of the application instance data 
  2311. is valid. 
  2312. Prototype 
  2313.  
  2314. ERESEwindowValid 
  2315. Parameters  GlobData (GLOBDATA *) Pointer to application instance data. 
  2316. Returns rc(BOOL) 
  2317.  
  2318.  o TRUE  - The the active edit window handle is valid. 
  2319.  o FLASE - The the active edit window handle is not valid. 
  2320.  
  2321.  Remarks 
  2322.  
  2323.  
  2324. ΓòÉΓòÉΓòÉ 9.11. ERESSendOpenMsgToApp ΓòÉΓòÉΓòÉ
  2325.  
  2326.  
  2327. ΓòÉΓòÉΓòÉ 9.11.1. (Send open message to application) ΓòÉΓòÉΓòÉ
  2328.  
  2329.  
  2330. Purpose Finds the handle of applications client window, and posts it a message 
  2331. to open the files in the shared message buffer of the application instance 
  2332. data. 
  2333. Prototype 
  2334.  
  2335. ERESSendOpenMsgToApp 
  2336. Parameters  ID (USHORT) Message response to sending the EPM_BOOK_ID message to 
  2337. the applications window. 
  2338. Returns  VOID 
  2339. Remarks  This function traverses through all existing frame windows searching 
  2340. for the applications window. The Custom message EPM_BOOK_ID is used to test 
  2341. whether a windows is that of the application. If a window responds to an 
  2342. EPM_BOOK_ID message with ID then it is the applications window. 
  2343. GlobData->ShrMsgBuff contains the name of the file to open. 
  2344.  
  2345.  
  2346. ΓòÉΓòÉΓòÉ 9.12. ERESShutDown ΓòÉΓòÉΓòÉ
  2347.  
  2348.  
  2349. ΓòÉΓòÉΓòÉ 9.12.1. (Shut Down) ΓòÉΓòÉΓòÉ
  2350.  
  2351.  
  2352. Purpose Systematically closes all E-MLE's associated with an application. 
  2353. Prototype 
  2354.  
  2355. ERESShutDown 
  2356. Parameters  GlobData (GLOBDATA *) Pointer to application instance data. 
  2357. Returns rc(BOOL) 
  2358.  
  2359.  o TRUE  - A given file in an edit window does not wish to close down because 
  2360.    it has yet to be saved. 
  2361.  o FLASE - Shut down of all edit windows completed. 
  2362.  
  2363.  Remarks 
  2364.  
  2365.  
  2366. ΓòÉΓòÉΓòÉ 9.13. ERESInitEResStruct ΓòÉΓòÉΓòÉ
  2367.  
  2368.  
  2369. ΓòÉΓòÉΓòÉ 9.13.1. (Initialize the ERES structure) ΓòÉΓòÉΓòÉ
  2370.  
  2371.  
  2372. Purpose Initializes the eres field of the GlobData structure. 
  2373. Prototype 
  2374.  
  2375. ERESInitEResStruct 
  2376. Parameters  hwnd (HWND) The window handle of the applications client window. 
  2377. GlobData (GLOBDATA *) Pointer to applications instance data. 
  2378. Returns  VOID 
  2379. Remarks  The pointer to this structure is copied and used internally in 
  2380. ERES.DLL. 
  2381.  
  2382.  
  2383. ΓòÉΓòÉΓòÉ 9.14. ERESCheckVersion ΓòÉΓòÉΓòÉ
  2384.  
  2385.  
  2386. ΓòÉΓòÉΓòÉ 9.14.1. (Check ERES.DLL version) ΓòÉΓòÉΓòÉ
  2387.  
  2388.  
  2389. Purpose Compare the ERES.DLL's version number with that of E.DLL . 
  2390. Prototype 
  2391.  
  2392. ERESCheckVersion 
  2393. Parameters  No Parameters 
  2394. Returns rc (BOOL) 
  2395.  
  2396.  o TRUE  - The Version numbers are the same. 
  2397.  o FLASE - Version conflict exits. 
  2398.  
  2399.  
  2400. ΓòÉΓòÉΓòÉ 9.15. ERESProcessCommands ΓòÉΓòÉΓòÉ
  2401.  
  2402.  
  2403. ΓòÉΓòÉΓòÉ 9.15.1. (Process command messages) ΓòÉΓòÉΓòÉ
  2404.  
  2405.  
  2406. Purpose Process WM_COMMAND messages sent to the applications default window 
  2407. procedure. 
  2408. Prototype 
  2409.  
  2410. ERESProcessCommands 
  2411. Parameters  mp1 (MPARAM) WM_COMMAND message parameter.  mp2 (MPARAM) Pointer to 
  2412. dialog input information.  GlobData (GLOBDATA *) Pointer to application 
  2413. instance data. 
  2414. Returns  VOID 
  2415. Remarks  This functions is used when  ERESCommonWndProc() is the default window 
  2416. procedure of the application. 
  2417.  
  2418.  
  2419. ΓòÉΓòÉΓòÉ 9.16. ERESEditwindowList ΓòÉΓòÉΓòÉ
  2420.  
  2421.  
  2422. ΓòÉΓòÉΓòÉ 9.16.1. (Show listing of available edit windows) ΓòÉΓòÉΓòÉ
  2423.  
  2424.  
  2425. Purpose Create a Popup menu that contains the names of the available edit 
  2426. windows which the user can transfer control to. 
  2427. Prototype 
  2428.  
  2429. ERESEditwindowList 
  2430. Parameters  GlobData (GLOBDATA *) Pointer to application instance data. 
  2431. Returns  VOID 
  2432. Remarks  GlobData->EditWindowListStyle controls the positioning of the edit 
  2433. list window dialog  relative to the applications client window. (See Appendix F 
  2434. for the available options) 
  2435.  
  2436.  
  2437. ΓòÉΓòÉΓòÉ 10. ERES.DLL - Exported Dialog Box Procedures ΓòÉΓòÉΓòÉ
  2438.  
  2439.  The following dialog box procedures are exported by ERES.DLL. In order to use 
  2440. any of these dialogs an application must adhere to the required code outlined 
  2441. in the previous section. 
  2442.  
  2443.  o ERESOpenDlgProc Open dialog procedure. Full file selection dialog box 
  2444.    includes fields specifying drives, directories, files, path name, and a file 
  2445.    name entry field. 
  2446.  o ERESOpen1DlgProc Open dialog procedure. Contains a list of previously 
  2447.    entered file names, and an entry field. 
  2448.  o ERESCommandDlgProc Edit window command dialog box. 
  2449.  o FindChangeDlgProc Allows find/change commands to be enter from dialog box. 
  2450.  o ConfigDlgProc Configuration edit window dialog procedure. 
  2451.  o EntryBoxDlgProc General purpose entry dialog box. 
  2452.  o ListBoxDlgProc 
  2453.  o QuitBoxDlgProc  Quit box dialog. 
  2454.  
  2455.  
  2456. ΓòÉΓòÉΓòÉ 10.1. ERESOpen1DlgProc ΓòÉΓòÉΓòÉ
  2457.  
  2458.  
  2459. ΓòÉΓòÉΓòÉ 10.1.1. (Open dialog procedure one) ΓòÉΓòÉΓòÉ
  2460.  
  2461.  
  2462. Purpose Open1 dialog box procedure. 
  2463. Prototype 
  2464.  
  2465. ERESOpen1DlgProc 
  2466. Parameters  hwnd (HWND)  The handle to the dialog box.  message (USHORT) 
  2467. Window message.  lparm1 (MPARAM)  Message parameter one.  lparm2 (MPARAM) 
  2468. Message parameter two. 
  2469. Returns  VOID 
  2470. Remarks  This dialog contains a list of previously entered file names, and an 
  2471. entry field. This dialog can be called using the WinDlgBox() function. For 
  2472. example: 
  2473.  
  2474.     WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  2475.  
  2476.  o Parent    - Window handle of the parent of the dialog 
  2477.  o Owner    - Window handle of the owner of the dialog 
  2478.  o DlgProc   - Window procedure of the dialog (ERESOpen1DlgProc) 
  2479.  o Resource   - Where the dialog resource is located (ERES) 
  2480.  o Dlgid    - Dialog id (DLG_OPEN1) 
  2481.  o CreateParam - Dialog creation parameter. Must be set to(&GlobData->eres). 
  2482.  
  2483.  
  2484. ΓòÉΓòÉΓòÉ 10.2. ERESCommandDlgProc ΓòÉΓòÉΓòÉ
  2485.  
  2486.  
  2487. ΓòÉΓòÉΓòÉ 10.2.1. (Command dialog procedure) ΓòÉΓòÉΓòÉ
  2488.  
  2489.  
  2490. Purpose Edit window command line dialog procedure. 
  2491. Prototype 
  2492.  
  2493. ERESCommandDlgProc 
  2494. Parameters  hwnd (HWND)  The handle to the dialog box.  message (USHORT) 
  2495. Window message.  lparm1 (MPARAM)  Message parameter one.  lparm2 (MPARAM) 
  2496. Message parameter two. 
  2497. Returns  VOID 
  2498. Remarks  This is an edit window command line dialog box, which includes an 
  2499. entry field and a scrollable list of previous commands. This dialog can be 
  2500. called using the WinDlgBox() function. For example: 
  2501.  
  2502.    WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  2503.  
  2504.  o Parent    - Window handle of the parent of the dialog 
  2505.  o Owner    - Window handle of the owner of the dialog 
  2506.  o DlgProc   - Window procedure of the dialog (ERESCommandDlgProc) 
  2507.  o Resource   - Where the dialog resource is located (ERES) 
  2508.  o Dlgid    - Dialog id (IDM_COMMANDS) 
  2509.  o CreateParam - Dialog creation parameter. Must be set to(&GlobData->eres). 
  2510.  
  2511.  
  2512. ΓòÉΓòÉΓòÉ 10.3. ERESFindChangeDlgProc ΓòÉΓòÉΓòÉ
  2513.  
  2514.  
  2515. ΓòÉΓòÉΓòÉ 10.3.1. (Find/Change dialog procedure) ΓòÉΓòÉΓòÉ
  2516.  
  2517.  
  2518. Purpose Find/Change commands dialog procedure. 
  2519. Prototype 
  2520.  
  2521. ERESFindChangeDlgProc 
  2522. Parameters  hwnd (HWND)  The handle to the dialog box.  message (USHORT) 
  2523. Window message.  lparm1 (MPARAM)  Message parameter one.  lparm2 (MPARAM) 
  2524. Message parameter two. 
  2525. Returns  VOID 
  2526. Remarks  This dialog allows find/change commands to be entered directly from 
  2527. it. This dialog can be called using the WinDlgBox() function. For example: 
  2528.  
  2529.    WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  2530.  
  2531.  o Parent    - Window handle of the parent of the dialog 
  2532.  o Owner    - Window handle of the owner of the dialog 
  2533.  o DlgProc   - Window procedure of the dialog (ERESFindChangeDlgProc) 
  2534.  o Resource   - Where the dialog resource is located (ERES) 
  2535.  o Dlgid    - Dialog id (DLG_CHANGE). 
  2536.  o CreateParam - Dialog creation parameter. Must be set to(&GlobData->eres). 
  2537.  
  2538.  
  2539. ΓòÉΓòÉΓòÉ 10.4. ERESConfigDlgProc ΓòÉΓòÉΓòÉ
  2540.  
  2541.  
  2542. ΓòÉΓòÉΓòÉ 10.4.1. (Configuation dialog procedure) ΓòÉΓòÉΓòÉ
  2543.  
  2544.  
  2545. Purpose Allow edit window options to be configured from dialog box. 
  2546. Prototype 
  2547.  
  2548. ERESConfigDlgProc 
  2549. Parameters  hwnd (HWND)  The handle to the dialog box.  message (USHORT) 
  2550. Window message.  lparm1 (MPARAM)  Message parameter one.  lparm2 (MPARAM) 
  2551. Message parameter two. 
  2552. Returns  VOID 
  2553. Remarks  This dialog allows configuration of edit window options. These options 
  2554. include setting margins, autosave level, tabs, colors, and paths. This dialog 
  2555. can be called using the WinDlgBox() function. For example: 
  2556.  
  2557.     WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  2558.  
  2559.  o Parent    - Window handle of the parent of the dialog 
  2560.  o Owner    - Window handle of the owner of the dialog 
  2561.  o DlgProc   - Window procedure of the dialog (ERESConfigDlgProc) 
  2562.  o Resource   - Where the dialog resource is located (ERES) 
  2563.  o Dlgid    - Dialog id (DLG_CONFIG) 
  2564.  o CreateParam - Dialog creation parameter. Must be set to(&GlobData->eres). 
  2565.  
  2566.  
  2567. ΓòÉΓòÉΓòÉ 10.5. EntryBoxDlgProc ΓòÉΓòÉΓòÉ
  2568.  
  2569.  
  2570. ΓòÉΓòÉΓòÉ 10.5.1. (Entry dialog box procedure) ΓòÉΓòÉΓòÉ
  2571.  
  2572.  
  2573. Purpose General purpose entry dialog box. 
  2574. Prototype 
  2575.  
  2576. EntryBoxDlgProc 
  2577. Parameters  hwnd (HWND)  The handle to the dialog box.  message (USHORT) 
  2578. Window message.  lparm1 (MPARAM)  Message parameter one.  lparm2 (MPARAM) 
  2579. Message parameter two. 
  2580. Returns  VOID 
  2581. Remarks  This dialog can be called using the WinDlgBox() function. For example: 
  2582.  
  2583.   WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  2584.  
  2585.  o Parent    - Window handle of the parent of the dialog 
  2586.  o Owner    - Window handle of the owner of the dialog 
  2587.  o DlgProc   - Window procedure of the dialog (EntryBoxDlgProc) 
  2588.  o Resource   - Where the dialog resource is located (ERES) 
  2589.  o Dlgid    - Dialog id (IDD_ENTRYBOX) 
  2590.  o CreateParam - Dialog creation parameter. Must be set to(PENTRYBOXINFO). 
  2591.    Check eres.h for a desription of the structure           ENTRYBOXINFO. A 
  2592.    pointer to this structure must be allocated           and passed into the 
  2593.    dialog procedure via this parameter. 
  2594.  
  2595.  
  2596. ΓòÉΓòÉΓòÉ 10.6. ListBoxDlgProc ΓòÉΓòÉΓòÉ
  2597.  
  2598.  
  2599. ΓòÉΓòÉΓòÉ 10.6.1. (List box dialog procedure) ΓòÉΓòÉΓòÉ
  2600.  
  2601.  
  2602. Purpose General purpose list dialog procedure. 
  2603. Prototype 
  2604.  
  2605. ListBoxDlgProc 
  2606. Parameters  hwnd (HWND)  The handle to the dialog box.  message (USHORT) 
  2607. Window message.  lparm1 (MPARAM)  Message parameter one.  lparm2 (MPARAM) 
  2608. Message parameter two. 
  2609. Returns  VOID 
  2610. Remarks  This dialog can be called using the WinDlgBox() function. For example: 
  2611.  
  2612.    WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  2613.  
  2614.  o Parent    - Window handle of the parent of the dialog 
  2615.  o Owner    - Window handle of the owner of the dialog 
  2616.  o DlgProc   - Window procedure of the dialog (ListBoxDlgProc) 
  2617.  o Resource   - Where the dialog resource is located (ERES) 
  2618.  o Dlgid    - Dialog id (ID_LISTBOX) 
  2619.  o CreateParam - Dialog creation parameter. Must be set to(PLISTBOXINFO). 
  2620.    Check eres.h for a description of the LISTBOXINFO           structure. A 
  2621.    pointer to this structure must be           allocated and passed into the 
  2622.    dialog procedure via this           parameter. 
  2623.  
  2624.  
  2625. ΓòÉΓòÉΓòÉ 10.7. QuitBoxDlgProc ΓòÉΓòÉΓòÉ
  2626.  
  2627.  
  2628. ΓòÉΓòÉΓòÉ 10.7.1. (Quit box dialog procedure) ΓòÉΓòÉΓòÉ
  2629.  
  2630.  
  2631. Purpose Sample Quit box dialog which handles EPM_EDIT_ASKTOxxx messages. 
  2632. Prototype 
  2633.  
  2634. QuitBoxDlgProc 
  2635. Parameters  hwnd (HWND)  The handle to the dialog box.  message (USHORT) 
  2636. Window message.  lparm1 (MPARAM)  Message parameter one.  lparm2 (MPARAM) 
  2637. Message parameter two. 
  2638. Returns  VOID 
  2639. Remarks  This dialog informs the user that a file has been modified. It 
  2640. includes an entry field to specify what name the modifications should be saved 
  2641. as, and the pushbuttons: Save , Discard, Cancel, and Help. This dialog can be 
  2642. called using the WinDlgBox() function. For example: 
  2643.  
  2644.   WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  2645.  
  2646.  o Parent    - Window handle of the parent of the dialog 
  2647.  o Owner    - Window handle of the owner of the dialog 
  2648.  o DlgProc   - Window procedure of the dialog (QuitBoxDlgProc) 
  2649.  o Resource   - Where the dialog resource is located (ERES) 
  2650.  o Dlgid    - Dialog id (IDD_QUITBOX) 
  2651.  o CreateParam - Dialog creation parameter. Must be set to(PQUITBOXINFO). 
  2652.    See eres.h for a description of the QUITBOXINFO           structure. A 
  2653.    pointer to this structure must be allocated           and passed into the 
  2654.    dialog via this parameter. 
  2655.  
  2656.  Returns  This dialog returns one of the following codes. 
  2657.  
  2658.  o ERES_SAVE   - Save was selected. File name is stored in 
  2659.    QUITBOXINFO->filename 
  2660.  o ERES_CANCEL  - Cancel was selected. 
  2661.  o ERES_DISCARD - Discard was selected. 
  2662.  
  2663.  
  2664. ΓòÉΓòÉΓòÉ 11. Example E Toolkit Application ΓòÉΓòÉΓòÉ
  2665.  
  2666.  The following sample source code demonstrates how an application can use 
  2667. various features of the E Toolkit. The source files included are: 
  2668.  
  2669.  o Edllsamp.c  - creates a sample edit window using E.DLL 
  2670.  
  2671.  o edllsamp.e  - macros defining the edit windows profile 
  2672.  
  2673.  o eressamp.c  - dialog resource management functions 
  2674.  
  2675.  o sampdlg.c  - sample dll which demonstrates two types of PM dialogs. 
  2676.  
  2677.  o sampdlg.e  - macros demonstrating how to invoke the sampdlg.c dialogs. 
  2678.  
  2679.  
  2680. ΓòÉΓòÉΓòÉ 12. Appendix ΓòÉΓòÉΓòÉ
  2681.  
  2682.  
  2683. ΓòÉΓòÉΓòÉ 12.1. Appendix A - ΓòÉΓòÉΓòÉ
  2684.  
  2685.  
  2686. ΓòÉΓòÉΓòÉ 12.1.1. Description of the Editor Information Structure. (EDITORINFO) ΓòÉΓòÉΓòÉ
  2687.  
  2688. ___________________________ 
  2689.  
  2690.  .------------------------------------------------------------------------.
  2691.  |   Editor Information Structure defined in 'C'                          |
  2692.  |------------------------------------------------------------------------|
  2693.  | typedef struct EDIT_INFO_TYPE {                                        |
  2694.  |    HAB       hab;           /* application anchor block              */|
  2695.  |    HWND      hwndparent;    /* handle to parent of edit window       */|
  2696.  |    HWND      hwndowner;     /* handle to owner of edit window        */|
  2697.  |    PRECTL    rect;          /* positioning of edit window            */|
  2698.  |    PSZ       filename;      /* file to be edited (with wildcard)     */|
  2699.  |    HPOINTER  hEditPtr;      /* handle to editor pointer icon.        */|
  2700.  |    HPOINTER  hMarkPtr;      /* handle to mark pointer icon.          */|
  2701.  |    VOID FAR *hEditorIcon;   /* editor ICON.                          */|
  2702.  |    ULONG     editorstyle;   /* internal editor options               */|
  2703.  |    ULONG     pmstyle;       /* PM standard window styles (FCF_xxxx)  */|
  2704.  |    USHORT    font;          /* TRUE = LARGE FONT,  FALSE = SMALL FONT*/|
  2705.  |    PSZ       exfile;        /* pre-compiled macro code file (xxx.EX) */|
  2706.  |    PSZ       *topmkr;       /* top and bottom of file marker         */|
  2707.  |    PSZ       *botmkr;       /*                                       */|
  2708.  |    SHORT     editid;        /* unique window id specified for  window  |
  2709.  |    PSZ       exsearchpath;  /* environment varible-search for .ex files|
  2710.  |    SHORT     reserved0;     /* for future use.                       */|
  2711.  | } EDITORINFO;                                                          |
  2712.  |                                                                        |
  2713.  `------------------------------------------------------------------------'
  2714.  
  2715. hab Application Anchor Block.  To obtain the applications anchor block use the 
  2716. WinInitialize function.  (example:  hab = WinInitialize(NULL);  ) 
  2717. hwndparent Window handle of the edit window parent.  Effects the positioning of 
  2718. the edit window.  In EPM, for example, the parent to the edit window is the 
  2719. desk top window (HWND_DESKTOP).  This is why the edit windows created by EPM 
  2720. are free to roam the entire desk top. 
  2721. hwndowner Window handle of the edit window owner.  Determines which window 
  2722. receives messages from the edit window.  For example, if a command is send to 
  2723. the edit window (via the EPM_EDIT_COMMAND message), and the command generates 
  2724. some type of return code.  The return code is put into message form (via the 
  2725. EPM_EDIT_RETCODE message), and passed to the edit window owner. 
  2726. rect Pointer to a PM rectangle structure.  Determines the positioning of the 
  2727. edit window.  The '.xLeft' and '.yBottom' fields set the lower lefthand corner 
  2728. of the edit window.  The '.xRight' and '.yTop' fields set the width and height 
  2729. of the edit window.  Since this is a pointer to a rectangle structure, pass the 
  2730. address of a RECTL in the following manner:   epm.rect = ▭ 
  2731. filename Pointer to a Asciiz string that contains a fully qualified path. If 
  2732. 'filename' is NULL then a blank file will be edited.  The blank file will be 
  2733. named '.Unnamed file'.  'filename'  can contain wildcards. For example, if 
  2734. '*.dat' were specified, all the files with the extension '.dat' will be placed 
  2735. in the newly created edit window. 
  2736. hEditPtr Handle to a pointer icon that will become active when the mouse 
  2737. pointer is over the client area of the edit window.  Use 
  2738. WinQueryPointer(HWND_DESKTOP); to use current mouse pointer. 
  2739. hMarkPtr Handle to a pointer that will be displayed when editor is marking 
  2740. text. 
  2741. hEditIcon Handle to a icon that will be displayed when the edit window is 
  2742. minimized. 
  2743. editorstyle Internal Editor style flags.  Logical 'OR' these flags together to 
  2744. form desired editor configuration. 
  2745.  
  2746.  o EDIT_STYLE_BROWSE     - browse file (view file only ) 
  2747.  
  2748.  o EDIT_STYLE_ACTIVEFOCUS   - when edit window becomes active it will 
  2749.    take focus. 
  2750.  
  2751.  o EDIT_STYLE_STATUSLINE   - Create edit window with status line 
  2752.  
  2753.  o EDIT_STYLE_MESSAGELINE   - Create edut window with message line 
  2754.  
  2755.  pmstyle  Standard PM window FCF_xxx styles.  For example, if you want to 
  2756.  create a edit window with a Title Bar, Vertical Scroll Bar, and Size Border, 
  2757.  you would use the following flags:   FCF_TITLEBAR | FCF_SIZEBORDER | 
  2758.  FCF_VERTSCROLL 
  2759.  nt Flag that specifies the size font to use in the edit window.  If font is 
  2760.  TRUE, the largest possible system AVIO font will be used. If font is FALSE, 
  2761.  the smallest possible system AVIO font will be used. 
  2762.  exfile Pointer to a asciiz string containing the name of a .EX file.  A .EX 
  2763.  file contains compiled macro code.  The file must be created using ETPM.EXE. 
  2764.  If this parameter is NULL, "EPM.EX" is used. 
  2765.  topmkr Pointer to a asciiz string containing the text that will be used to 
  2766.  denote the top of file. 
  2767.  botmkr Pointer to a asciiz string containing the text that will be used to 
  2768.  denote the bottom of file. 
  2769.  editid A unique editor id number that is used to identify edit windows created 
  2770.  by a particular application. 
  2771.  exsearchpath A pointer to a string that contains the name of an environment 
  2772.  variable. The internal toolkit will use the paths associated with this 
  2773.  environment variable to search for .ex files specified during the life of an 
  2774.  edit window.  If this field is NULL, EPMPATH is searched by default. 
  2775.  reserved0 Reserved for future enhancements. 
  2776.  
  2777.  
  2778. ΓòÉΓòÉΓòÉ 12.2. Appendix A1 - ΓòÉΓòÉΓòÉ
  2779.  
  2780.  
  2781. ΓòÉΓòÉΓòÉ 12.2.1. Field Constants ΓòÉΓòÉΓòÉ
  2782.  
  2783.  Used by EtkSetFileField(...), EtkQueryFileField, and EtkQueryFileFieldString. 
  2784.  
  2785.   ATTRIBUTE_SUPPORT_LEVEL  -    0 = No Attributes supported
  2786.   AUTOSAVE_FIELD           -    File Modifies Before Autosaving
  2787.   CODEPAGE_FIELD           -    Code page
  2788.   COL_FIELD                -    Column of Cursor.
  2789.   CURSORX_FIELD            -    X Cursor Position in pels.
  2790.   CURSORYG_FIELD           -
  2791.   CURSORY_FIELD            -    Y Cursor Position in pels.
  2792.   CURSOR_COLUMN            -    column of the cursor
  2793.   CURSOR_OFFSET            -
  2794.   DRAGCOLOR_FIELD          -    drag shadow
  2795.   DRAGSTYLE_FIELD          -    drag type (linbe, block, character)
  2796.   EA_AREA_FIELD            -    pointer to extended attribute area
  2797.   FILENAME_FIELD           -    file name
  2798.   FONTHEIGHT_FIELD         -    average font width
  2799.   FONTWIDTH_FIELD          -    average font height
  2800.   FONT_FIELD               -    internal font identifier string
  2801.   KEYSET_FIELD             -    Key set name
  2802.   LAST_FIELD               -    Number of last line in file. (absolute position)
  2803.   LINEG_FIELD              -
  2804.   LINE_FIELD               -    Number of line where cursor is located. (absolute position)
  2805.   LOCKHANDLE_FIELD         -    TRUE = File is locked
  2806.   MARGINS_FIELD            -    Margin String. ( Left Right Paragraph )
  2807.   MARKCOLOR_FIELD          -    Color of selected text
  2808.   MODIFY_FIELD             -    number of file modifications
  2809.   MOUSEX_FIELD             -    x position of mouse
  2810.   MOUSEY_FIELD             -    y position of mouse
  2811.   READONLY_FIELD           -    TRUE = BROWSE MODE
  2812.   SCROLLX_FIELD            -    x scroll increment
  2813.   SCROLLY_FIELD            -    y scroll increment
  2814.   TABS_FIELD               -    Tab rack.
  2815.   TEXTCOLOR_FIELD          -    forground and background text color
  2816.   TITLETEXT_FIELD          -    text to be placed on title bar
  2817.   USERSTRING_FIELD         -    string to be used by user
  2818.   VISIBLE_FIELD            -    file visible flag (FALSE=NOT in ring)
  2819.   WINDOWHEIGHTG_FIELD      -
  2820.   WINDOWHEIGHT_FIELD       -    height of window in pels
  2821.   WINDOWWIDTHG_FIELD       -
  2822.   WINDOWWIDTH_FIELD        -    width of window in pels
  2823.   WINDOWX_FIELD            -    starting x position of window
  2824.   WINDOWY_FIELD            -    starting x position of window
  2825.  
  2826.  
  2827. ΓòÉΓòÉΓòÉ 12.3. Appendix B - ΓòÉΓòÉΓòÉ
  2828.  
  2829.  
  2830. ΓòÉΓòÉΓòÉ 12.3.1. Editor Commands. ΓòÉΓòÉΓòÉ
  2831.  
  2832. See EPM Users guide for a list of editor Command. (EPM SCRIPT) 
  2833.  
  2834.  
  2835. ΓòÉΓòÉΓòÉ 12.4. Appendix C - ΓòÉΓòÉΓòÉ
  2836.  
  2837.  
  2838. ΓòÉΓòÉΓòÉ 12.4.1. Editor Return Codes ΓòÉΓòÉΓòÉ
  2839.  
  2840.   .----------------------------------------------------------.
  2841.   | Descriptor Constant                 | Return Code Value  |
  2842.   |----------------------------------------------------------|
  2843.   | SEE_MESSAGE                         |  0                 |
  2844.   |----------------------------------------------------------|
  2845.   | FILE_NOT_FOUND_RC                   | -2                 |
  2846.   |----------------------------------------------------------|
  2847.   | PATH_NOT_FOUND_RC                   | -3                 |
  2848.   |----------------------------------------------------------|
  2849.   | TOO_MANY_OPEN_FILES_RC              | -4                 |
  2850.   |----------------------------------------------------------|
  2851.   | ACCESS_DENIED_RC                    | -5                 |
  2852.   |----------------------------------------------------------|
  2853.   | MEMORY_CONTROL_BLOCKS_RC            | -7                 |
  2854.   |----------------------------------------------------------|
  2855.   | INSUFFICIENT_MEMORY_RC              | -8                 |
  2856.   |----------------------------------------------------------|
  2857.   | INVALID_DRIVE_RC                    | -15                |
  2858.   |----------------------------------------------------------|
  2859.   | NO_MORE_FILES_RC                    | -18                |
  2860.   |----------------------------------------------------------|
  2861.   | NUMERIC_OVERFLOW_RC                 | -254               |
  2862.   |----------------------------------------------------------|
  2863.   | INVALID_NUMBER_ARGUMENT_RC          | -255               |
  2864.   |----------------------------------------------------------|
  2865.   | RECURSION_TOO_DEEP_RC               | -256               |
  2866.   |----------------------------------------------------------|
  2867.   | INVALID_NUMBER_OF_PARAMETERS_RC     | -257               |
  2868.   |----------------------------------------------------------|
  2869.   | OUT_OF_STRING_SPACE_RC              | -258               |
  2870.   |----------------------------------------------------------|
  2871.   | EXPRESSION_STACK_OVERFLOW_RC        | -259               |
  2872.   |----------------------------------------------------------|
  2873.   | INVALID_FILEID_RC                   | -260               |
  2874.   |----------------------------------------------------------|
  2875.   | ILLEGAL_OPCODE_RC                   | -261               |
  2876.   |----------------------------------------------------------|
  2877.   | TOO_MANY_WINDOWS_RC                 | -262               |
  2878.   |----------------------------------------------------------|
  2879.   | INVALID_ARGUMENT_RC                 | -263               |
  2880.   |----------------------------------------------------------|
  2881.   | LOOP_STACK_OVERFLOW_RC              | -264               |
  2882.   |----------------------------------------------------------|
  2883.   | DIVIDE_BY_ZERO_RC                   | -265               |
  2884.   |----------------------------------------------------------|
  2885.   | UNABLE_TO_SHRINK_RC                 | -266               |
  2886.   |----------------------------------------------------------|
  2887.   | INVALID_CALL_BY_REFERENCE_RC        | -267               |
  2888.   |----------------------------------------------------------|
  2889.   | PROCEDURE_NEEDS_MORE_ARGUMENTS_     | -268               |
  2890.   |----------------------------------------------------------|
  2891.   | BREAK_KEY_PRESSED_RC                | -269               |
  2892.   |----------------------------------------------------------|
  2893.   | NOT_ENOUGH_MEMORY_RC                | -270               |
  2894.   +.---------------------------------------------------------+
  2895.  
  2896.   +----------------------------------------------------------+
  2897.   | ERROR_IN_MARGIN_SETTINGS_RC         | -271               |
  2898.   |----------------------------------------------------------|
  2899.   | ERROR_IN_TAB_SETTINGS_RC            | -272               |
  2900.   |----------------------------------------------------------|
  2901.   | STRING_NOT_FOUND_RC                 | -273               |
  2902.   |----------------------------------------------------------|
  2903.   | UNKNOWN_COMMAND_RC                  | -274               |
  2904.   |----------------------------------------------------------|
  2905.   | MISSING_FILENAME_RC                 | -275               |
  2906.   |----------------------------------------------------------|
  2907.   | LINE_TOO_LONG_TO_JOIN_RC            | -276               |
  2908.   |----------------------------------------------------------|
  2909.   | TOO_MANY_FILES_RC                   | -277               |
  2910.   |----------------------------------------------------------|
  2911.   | LINES_TRUNCATED_RC                  | -278               |
  2912.   |----------------------------------------------------------|
  2913.   | TEXT_ALREADY_MARKED_RC              | -279               |
  2914.   |----------------------------------------------------------|
  2915.   | TEXT_NOT_MARKED_RC                  | -280               |
  2916.   |----------------------------------------------------------|
  2917.   | SOURCE_DEST_CONFLICT_RC             | -281               |
  2918.   |----------------------------------------------------------|
  2919.   | NEW_FILE_RC                         | -282               |
  2920.   |----------------------------------------------------------|
  2921.   | LINE_MARK_REQUIRED_RC               | -283               |
  2922.   |----------------------------------------------------------|
  2923.   | ERROR_OPENING_FILE_RC               | -284               |
  2924.   |----------------------------------------------------------|
  2925.   | ERROR_WRITING_FILE_RC               | -285               |
  2926.   |----------------------------------------------------------|
  2927.   | ERROR_READING_FILE_RC               | -286               |
  2928.   |----------------------------------------------------------|
  2929.   | INSUFFICIENT_DISK_SPACE_RC          | -287               |
  2930.   |----------------------------------------------------------|
  2931.   | BLOCK_MARK_REQUIRED_RC              | -288               |
  2932.   |----------------------------------------------------------|
  2933.   | TOO_MANY_RINGS_RC                   | -289               |
  2934.   |----------------------------------------------------------|
  2935.   | INCORRECT_VERSION_RC                | -290               |
  2936.   |----------------------------------------------------------|
  2937.   | NO_MAIN_ENTRY_POINT_RC              | -291               |
  2938.   |----------------------------------------------------------|
  2939.   | ERROR_CLOSING_FILE_RC               | -292               |
  2940.   |----------------------------------------------------------|
  2941.   | CMDLINE_TOO_LONG_RC                 | -300               |
  2942.   |----------------------------------------------------------|
  2943.   | CANT_UNLINK_MOD_IN_USE_RC           | -301               |
  2944.   |----------------------------------------------------------|
  2945.   | CANT_UNLINK_KEY_MOD_RC              | -302               |
  2946.   |----------------------------------------------------------|
  2947.   | INTERNAL_INVALID_MOD_NBR_RC         | -303               |
  2948.   |----------------------------------------------------------|
  2949.   | LINK_MODULE_ERROR_RC                | -304               |
  2950.   +----------------------------------------------------------+
  2951.  
  2952.   +----------------------------------------------------------+
  2953.   | MAIN_NOT_FOUND_RC                   | -305               |
  2954.   |----------------------------------------------------------|
  2955.   | INIT_NOT_FOUND_RC                   | -306               |
  2956.   |----------------------------------------------------------|
  2957.   | LOADFILE_FINDFILE_RC                | -307               |
  2958.   |----------------------------------------------------------|
  2959.   | LOADFILE_MAKEFILE_RC                | -308               |
  2960.   |----------------------------------------------------------|
  2961.   | LOADFILE_ALREADYLINKED_RC           | -309               |
  2962.   |----------------------------------------------------------|
  2963.   | UNLINK_UNKNOWN_MODULE_RC            | -310               |
  2964.   |----------------------------------------------------------|
  2965.   | UNLINK_BAD_MODULE_FN_RC             | -311               |
  2966.   |----------------------------------------------------------|
  2967.   | CALL_DUPLICATED_PROC_RC             | -312               |
  2968.   |----------------------------------------------------------|
  2969.   | CALL_UNKNOWN_PROC_RC                | -313               |
  2970.   |----------------------------------------------------------|
  2971.   | GREP_MEMORY_ERROR                   | -314               |
  2972.   |----------------------------------------------------------|
  2973.   | GREP_MISSING_BRACKET                | -315               |
  2974.   |----------------------------------------------------------|
  2975.   | GREP_BAD_RANGE                      | -316               |
  2976.   |----------------------------------------------------------|
  2977.   | GREP_EMPTY_RANGE                    | -317               |
  2978.   |----------------------------------------------------------|
  2979.   | GREP_REGULAR_EXPRESSION_LONG        | -318               |
  2980.   |----------------------------------------------------------|
  2981.   | DYNALINK_INCORRECT_PARAMETERS       | -319               |
  2982.   |----------------------------------------------------------|
  2983.   | CANNOT_FIND_KEYSET                  | -321               |
  2984.   |----------------------------------------------------------|
  2985.   | BAD_LIBRARY_OR_PROC                 | -322               |
  2986.   |----------------------------------------------------------|
  2987.   | INVALID_LINE_NUMBER                 | -323               |
  2988.   |----------------------------------------------------------|
  2989.   | KBDSETSTATUS_FAILED                 | -324               |
  2990.   |----------------------------------------------------------|
  2991.   | BUFFER_CREATE_SIZE                  | -325               |
  2992.   |----------------------------------------------------------|
  2993.   | BAD_PROCEDURE                       | -326               |
  2994.   `----------------------------------------------------------'
  2995.  
  2996.  
  2997. ΓòÉΓòÉΓòÉ 12.5. Appendix E - ΓòÉΓòÉΓòÉ
  2998.  
  2999.  
  3000. ΓòÉΓòÉΓòÉ 12.5.1. Description of the Global Data  Structure. (GLOBDATA) ΓòÉΓòÉΓòÉ
  3001.  
  3002. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
  3003.  
  3004.  +------------------------------------------------------------------------+
  3005.  |   Global Data Structure defined in 'C'                                 |
  3006.  |------------------------------------------------------------------------|
  3007.  |   typedef struct {                                                     |
  3008.  |       HAB         hAB;                                                 |
  3009.  |       EPMRES      eres;                                                |
  3010.  |       HMODULE     eresModule;                                          |
  3011.  |       HMQ         hmq;                                                 |
  3012.  |       HDC         hDCApp;                                              |
  3013.  |       PFNWP       DefFrameProc;                                        |
  3014.  |       PSZ         ShrMsgBuff;                                          |
  3015.  |       RECTL       rc;                                                  |
  3016.  |       USHORT      stagcount;                                           |
  3017.  |       CHAR        LastCmdLine[256];                                    |
  3018.  |       CHAR        EPMClass[32];                                        |
  3019.  |       CHAR        AllowMultProcesses;                                  |
  3020.  |       HWND        hwndHelpInstance;                                    |
  3021.  |       HELPINIT    hmiHelpData;                                         |
  3022.  |       CHAR        IniApplicationName[20];                              |
  3023.  |       PSZ         ExSearchPath;                                        |
  3024.  |       BOOL        CountOnlyVisibleWindows;                             |
  3025.  |       USHORT      ApplicationID;                                       |
  3026.  |       CHAR        ApplicationName[20];                                 |
  3027.  |       ULONG       EditWindowListStyle;                                 |
  3028.  |       } GLOBDATA;                                                      |
  3029.  |                                                                        |
  3030.  +------------------------------------------------------------------------+
  3031.  
  3032. hAB The Application Anchor Block.  To obtain the applications anchor block use 
  3033. the WinInitialize function.  (example:  hab = WinInitialize(NULL);  ) 
  3034. eres Structure shared between applications and ERES.DLL. The pointer to this 
  3035. structure is passed into ERES.DLL where it is used internally. (See Appendix G 
  3036. for a description of this structure) 
  3037. eresModule Module handle of ERES.DLL. Optained with the DosLoadModule function. 
  3038. hmq The handle to the applications message queue. 
  3039. hDCApp The handle to the applications window device context. 
  3040. DefFrameProc Used internally. 
  3041. ShrMsgBuff The pointer to the applications shared message buffer. 
  3042. rc Used in positioning editwindows. 
  3043. stagcount Stagger window count. 
  3044. LastCmdLine The last command line used to  open an edit window. 
  3045. EPMClass Edit window class name. Used to identify edit windows. 
  3046. AllowMultProcesses Flag to allow multiple processes 
  3047. hwndHelpInstance Window handle of the a help instance of the information 
  3048. presentation facility 
  3049. hmiHelpData Hook for the information presentation facility. 
  3050. IniApplicationName Name of the ini file to save and retrieve internal data 
  3051. from. 
  3052. ExSearchPath Ex file search path. 
  3053. CountOnlyVisibleWindows When set this flag insures that ERESCountEwindows 
  3054. returns only the number of visible edit windows. 
  3055. ApplicationID Unique window id specified for editwindows. 
  3056. ApplicationName Name of application. 
  3057. EditWindowListStyle Edit window list dialog style flag. The following flags can 
  3058. be used to position the edit window list dialog. 
  3059.  
  3060.  o EWindow_List_Window_Middle - display in the middle of the active window. 
  3061.  
  3062.  o EWindow_List_Window_Corner - display in the lower right corner of the 
  3063.    active window. 
  3064.  
  3065.  
  3066. ΓòÉΓòÉΓòÉ 12.6. Appendix F - ΓòÉΓòÉΓòÉ
  3067.  
  3068.  
  3069. ΓòÉΓòÉΓòÉ 12.6.1. Description of the Eres Data Structure. (EPMRES) ΓòÉΓòÉΓòÉ
  3070.  
  3071. _____________________ 
  3072.  
  3073.  .------------------------------------------------------------------------.
  3074.  |   Eres Data Structure defined in 'C'                                   |
  3075.  |------------------------------------------------------------------------|
  3076.  |   typedef struct EPMRES_TYPE {                                         |
  3077.  |      HAB     hAB;                                                      |
  3078.  |      HWND    hwndAppFrame;                                             |
  3079.  |      HWND    hwndAppClient;                                            |
  3080.  |      HWND    hwndActiveEdit;                                           |
  3081.  |      HWND    hwndActiveDlgBox;                                         |
  3082.  |      HWND    hwndSearchReplaceBox;                                     |
  3083.  |      CHAR    exfilename[MAXFILENAME];                                  |
  3084.  |      LISTDLG cmd;                                                      |
  3085.  |      LISTDLG msgbox;                                                   |
  3086.  |      LISTDLG open1;                                                    |
  3087.  |      BOOL    skipopen1;                                                |
  3088.  |      CHAR    saveretpath[MAXFILENAME];                                 |
  3089.  |      PVOID   dlgin;                                                    |
  3090.  |      PVOID   internal;                                                 |
  3091.  |   } EPMRES;                                                            |
  3092.  .------------------------------------------------------------------------.
  3093.  
  3094.  
  3095. hAB The Application Anchor Block.  To obtain the applications anchor block use 
  3096. the WinInitialize function.  (example:  hab = WinInitialize(NULL);  ) 
  3097. hwndAppFrame The applications frame window handle. 
  3098. hwndAppClient The applications client window handle. 
  3099. hwndActiveEdit The window handle of the active edit window. 
  3100. hwndActiveDlgBox The window handle of the active dialog box. 
  3101. hwndSearchReplaceBox The window handle of the Search Replace dialog box. 
  3102. exfilename String containing the name of the main ex file. 
  3103. cmd Structure used to store entries in the command dialog box. 
  3104. msgbox Structure used to store entries in the Message box dialog. 
  3105. open1 Structure containing previous entries in the open dialog box. 
  3106. skipopen1 When set skips the open1 dialog box and presents the list dialog box. 
  3107. saveretpath The name of the file containing retrieve list data. 
  3108. dlgin Pointer to dialog input information. 
  3109. internal Used internally in ERES.DLL. 
  3110.  
  3111.  
  3112. ΓòÉΓòÉΓòÉ 12.7. Appendix G - ΓòÉΓòÉΓòÉ
  3113.  
  3114.  
  3115. ΓòÉΓòÉΓòÉ 12.7.1. Description the messages handled by ERESCommonWndProc() ΓòÉΓòÉΓòÉ
  3116.  
  3117. _____________________  The Following message are handled by 
  3118. ERESCommonWndProc(): 
  3119.  
  3120.  o WM_COMMAND 
  3121.  o EPM_EDIT_NEWFILE 
  3122.  o EPM_EDIT_HELPNOTIFY 
  3123.  o EPM_EDIT_RETCODE 
  3124.  o EPM_EDIT_DESTROYNOTIFY 
  3125.  o EPM_POPCMDLINE 
  3126.  o EPM_POPMSGBOX 
  3127.  o EPM_POPOPENDLG 
  3128.  o EPM_POPCHANGEDLG 
  3129.  o EPM_POPCONFIGDLG 
  3130.  o EPM_POPHELPBROWSER 
  3131.  o EPM_POPHELPMGRPANEL 
  3132.  o EPM_OPEN_EDITWINDOW 
  3133.  o EPM_SAVE_LISTS 
  3134.  o EPM_RETRIEVE_LISTS 
  3135.  o EPM_EDIT_ACTIVEHWND 
  3136.  
  3137.  WM_COMMAND  Process a message from the system menu bar. Message parameter one 
  3138.  is the id of the item selected. 
  3139.  EPM_EDIT_NEWFILE An existing edit window is requesting to open up a new edit 
  3140.  window. ERESOpenEditWindow is called to handle it. 
  3141.  EPM_EDIT_HELPNOTIFY This message is in response to a WM_HELP message that was 
  3142.  received by an edit window. It is handled by either creating a help manager 
  3143.  panel, or create a file with the help brower file. 
  3144.  EPM_EDIT_RETCODE  Used internally. 
  3145.  EPM_EDIT_DESTROYNOTIFY This message notifies EPM that a edit window has been 
  3146.  closed.  If it was the last edit window and the search replace dialog exists, 
  3147.  destroy that dialog. 
  3148.  EPM_POPCMDLINE This message is handled by poping the command line dialog box. 
  3149.  EPM_POPMSGBOX This message is handled by poping the message dialog box. 
  3150.  EPM_POPOPENDLG This message is handled by poping the open1 dialog box. 
  3151.  EPM_POPCHANGEDLG This message is handled by poping the find/change dialog box. 
  3152.  EPM_POPCONFIGDLG This message is handled by poping the configuration dialog 
  3153.  box. 
  3154.  EPM_POPHELPBROWSER This message is handled by poping an edit window containing 
  3155.  the help browser file. 
  3156.  EPM_POPHELPMGRPANEL This message pops a help manager panel. 
  3157.  EPM_OPEN_EDITWINDOW Used internally by EPM 
  3158.  EPM_SAVE_LISTS Calls ERESSaveLists() 
  3159.  EPM_RETRIEVELIST Calls ERESRetrieveList() 
  3160.  EPM_EDIT_ACTIVEHWND Used internally.